Jump to content

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


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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.