Jump to content

[SOLVED] I think im being dense... can someone have a look?


Accurax

Recommended Posts

Hi guys,

 

Been a while since ive written much php... and i think this may be a dense question ... but.. i cant seem to make a javascript onclick event fire when its echo'd out inside a php statement.. see below:

 

echo "<form method='post' action='" . $self . "'>";

echo "<input type=radio name='radio' value='" . $row['pres_title'] . "' onchange='this.form.submit()'>";
echo "</form>";

 

this works when its just in an html page... but i cant for the life of me seem to make it fire as is shown above ... can anyone shed any light on this please?

 

thanks in advance

 

Accy

echo "<input type=radio name='radio' value='" . $row['pres_title'] . "' onClick='this.form.submit();'>";

Works OK with onClick, which is what you say is a problem.... but you're actually trying to trigger an onChange event in your code

lol... its ok i was being a muppet .... must be this cold ive got ... im about to post a thread to do with the "real" issue here... this however is solved in itself... thanks for those who took the time to look :)

 

hmmm cant seem to see the "mark as solved" option

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.