codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  forms and variables  flashgroover at 18:43 on Saturday, October 25, 2003
 

hello all, my problem is that i would like to set the value of a test field to the value of a variable i got from a cookie. when the page loads and there is no cookie value set i assume that the value should come in null. if there is a cookie value set, then i would liek the text feilds value to be that. am i correct in this thought pattern? this is the dcript i have so far below. i get an error when the page loads,
onChange="setCookie('name', this.value)
at this line i get an error that i am missing a ")" around 'name'.
can anybody solve this perplexing problem? kudo's to those that can, help me please!!

<form action='/forum/WSmainframe.html' method='GET' target='mainframe' name='cart3form'>

<script language="JavaScript" type="text/JavaScript">

var name2 = getCookie('name');
window.document.cart3form.name.value = name2;
alert(window.document.cart3form.name.value);

document.write('<td width="60%" align="left"><input type="text" name="name" maxlength="40" size="31" onChange="setCookie('name', this.value)"> </td>');

</script>
</form>








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Use of VB .NET
•  Cookies and new pages
•  need help with e-mail validation
•  Problems with DHTML dropdown menus
•  Re: Passing values from a select box to a text box
•  lowerCase to UpperCase
•  Re: Javascript validation that will stop a ` (apostrophe) being entered
•  Re: pop-up Javascript calendar
•  nested classes


Recent Articles
Communicating with the Database (Using ADO)
MagicGrid
Simple Thumbnail Browsing Solution
Type Anywhere
A Better Moustrap: FmtDate to replace FormatDateTime
ASP.NET Forum Source Code
Internal Search Engine
Javascript Growing Window
Simple date validation
Search engine friendly URLs using ASP.NET (C#.NET)


Site Survey
Help us serve you better. Take a five minute survey. Click here!

© Copyright codetoad.com 2001-2005