... Javascript Help ...



• Javascript Help »»


Lads again my JS knowledge is letting me down in AJAX.

My ajax is returning the code

Code:
addPubNum( 5940, '1796 Wolfe Tone Bar' , 'pubid1' );
This function can be seen here:

Code:
function addPubNum( id, name, pubnum ) {document.forms['addpub'].elements[ pubnum ][ document.forms['addpub'].elements[ pubnum].length ] = new Option( name, id );}
The problem is that this function/code isn't populating the form:

Code:
<table width="100%"> <form name="addpub" action="userpage.php" method="GET">

<tr><td colspan="2">Please Enter Your 1st Pub</td></tr>
<tr><td><select name="countyid" onChange="showPubNum(1,this.value);"><option value="0">Select County</option>
<option value="1">Antrim</option>
<option value="2">Armagh</option>
</select></td>
<td><select name="pubid1"><option value=""></option></select> </td></tr>
<tr><td colspan="2" align="right"><input type="submit" value="Add"></td></tr>
</form></table>

If anyone could see an error off the top of their head that would be great!

P.S. -> showPubNum(1,this.value); is working fine!
 Bookmark with:            
Source: IrishWebMasterForums | pub: 30 Jul 2008 by: garycocs | added: 30 Jul 2008 | cat: Coding Help | views: 19 time/s
Related Articles...
Leave a Comment...
Name: *
Email: *
Comment: *
Security Code: security code
*
     Remember me:
Categories
Channels
Press Release