Jump to content

[SOLVED] PLease Help with Php/javascript


Bigdogcms

Recommended Posts

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

 

 

Link to comment
https://forums.phpfreaks.com/topic/98978-solved-please-help-with-phpjavascript/
Share on other sites

<?
$A="$z->item(0)->childNodes->item(0)->nodeValue";
$B="$y->item(0)->childNodes->item(0)->nodeValue";
$C="$z->item(0)->childNodes->item(0)->nodeValue";

$hint= "<a href='#' onClick='document.email.Body.value+=(" . $A . ") " . $B .  "'><font color='#999999'>(" . $C  . ")</font></a>";

?>
[code]

[/code]

yes

 

here is a sample of the script i'm working on

 

http://bigdogcms.clanska.net/base/Search/search1.php

 

type

 

Chris

 

or josh

 

or coty

 

into the to field

 

it will bring up differnt emails

 

at the end you should see a f that puts words into the To of the field

 

i just need to user the nodes to fill in the email

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.