alohatofu Posted April 22, 2007 Share Posted April 22, 2007 <a href="javascript:freak_new()"> how can I assign let's say the title to the javascript button above? can I use <a href="javascript:freak_new?(<?php echo $title ?> )"> Quote Link to comment Share on other sites More sharing options...
emehrkay Posted April 22, 2007 Share Posted April 22, 2007 yes Quote Link to comment Share on other sites More sharing options...
alohatofu Posted April 22, 2007 Author Share Posted April 22, 2007 Ok thanks so that worked. now <?php $testing = 2345 ?> <a href="javascript:freak_new(<?php echo $testing ?>)"> I have a form in javascript "freak_new" When a user clicked on that form I want to automatically fill in the value on that form. How would I do that? Thanks Quote Link to comment Share on other sites More sharing options...
emehrkay Posted April 23, 2007 Share Posted April 23, 2007 function freak_new(val){ document.getElementById('id of field').value = val; } Quote Link to comment Share on other sites More sharing options...
alohatofu Posted April 23, 2007 Author Share Posted April 23, 2007 I"m sorry but I dont' have a clue on what that means. Quote Link to comment Share on other sites More sharing options...
fenway Posted April 23, 2007 Share Posted April 23, 2007 It means settting a value. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.