Jump to content

[SOLVED] NEED HELP!!!! Trying to use inline javascript in php echo!!!


Bigdogcms

Recommended Posts

i posted this once aready but i thought maybe if i clearify the title some more people will help, so here it is

 

Ok, so i have an ajax/php search form that allows me to search my db(right now an xml file) for users/there email

what i want to do is create a link that when the user clicks it it fills in the "to" input field

 

here's what i have so far

<?php
$hint= 
"<a href='#   
   ' onClick='document.email.Body.value+= (\ " . $z->item(0)->childNodes->item(0)->nodeValue . " \)'> " . 
    $y->item(0)->childNodes->item(0)->nodeValue .  " <font color='#999999'>(" . $z->item(0)->childNodes->item(0)->nodeValue  . ")</font></a>";
    }

?>

 

and here is a working copy of the javascript not in php

<a href="#   
   " onClick="document.email.Body.value+= 'Users email'">Click</a>

please help

 

 

 

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.