What am I doing wrong? 
Author Message
 What am I doing wrong?

This cookie script is not working. It does not pass the button value.

<html><head>
<SCRIPT LANGUAGE="JavaScript">
var expDays = 30;
var exp = new Date();
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
function go () {
  SetCookie('add', this.name, exp);
if (form == "yes") {
   url = 'List.htm';

Quote:
} else {

   url = 'remove.htm';
Quote:
}

window.location.href = url;
Quote:
}

</script>
</head><body>
<center><form>
<p align=center><font color="teal" size="3"><br>
Do you want to be add to the List?<br><br>
<input type=button name="yes" value="Yes" onClick="go();">
<input type=button name="no"  Value="No" onClick="go();"><br>
</p></font></form></center>
</body></html>

Thanks for the help.

Mark



Wed, 05 Feb 2003 03:00:00 GMT  
 What am I doing wrong?
function go (x) {
  SetCookie('add', x.name, exp.toUTCString());
if(x.name=='yes')
...

<input type=button name="yes" value="Yes" onClick="go(this);">
...

--

Mark L. Ferguson    Reply Only in Newsgroup
marfer's notes for OE 5.0 > http://www.geocities.com/SiliconValley/Bay/6386/IE_ng_notes.htm

Quote:

> This cookie script is not working. It does not pass the button value.

> <html><head>
> <SCRIPT LANGUAGE="JavaScript">
> var expDays = 30;
> var exp = new Date();
> exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
> function go () {
>   SetCookie('add', this.name, exp);
> if (form == "yes") {
>    url = 'List.htm';
> } else {
>    url = 'remove.htm';
> }
> window.location.href = url;
> }
> </script>
> </head><body>
> <center><form>
> <p align=center><font color="teal" size="3"><br>
> Do you want to be add to the List?<br><br>
> <input type=button name="yes" value="Yes" onClick="go();">
> <input type=button name="no"  Value="No" onClick="go();"><br>
> </p></font></form></center>
> </body></html>

> Thanks for the help.

> Mark



Wed, 05 Feb 2003 03:00:00 GMT  
 What am I doing wrong?
Thank you, That did the trick. I still am confused about passing form values
to the script, do know know of good information I can learn about form
values?

Thank you again,
Mark



Thu, 06 Feb 2003 03:00:00 GMT  
 What am I doing wrong?
http://msdn.microsoft.com/workshop/author/forms/formsoverview.asp

http://msdn.microsoft.com/workshop/author/forms/corner111799.asp

http://msdn.microsoft.com/workshop/author/forms/corner122099.asp

http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/for...

--

Mark L. Ferguson    Reply Only in Newsgroup
marfer's notes for OE 5.0 > http://www.geocities.com/SiliconValley/Bay/6386/IE_ng_notes.htm

Quote:

> Thank you, That did the trick. I still am confused about passing form values
> to the script, do know know of good information I can learn about form
> values?

> Thank you again,
> Mark



Thu, 06 Feb 2003 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. onkeypress - what am i doing wrong

2. newbie - what am I doing wrong?

3. exitserver and settransfer, what am I doing wrong?

4. What am I doing wrong here?

5. What am i doing wrong here????? HELP

6. Recordset object, what am i doing wrong?

7. What am I doing wrong??

8. What am I doing wrong?

9. WMI: what am I doing wrong?

10. Ok, now what am i doing wrong?

11. What Am I Doing WRONG ???

12. What am I doing wrong

 

 
Powered by phpBB® Forum Software