Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Php form with javascript

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 30-11-2009
Member
 
Join Date: Apr 2008
Posts: 240
Php form with javascript
  

Hi
I am trying to change some of my code on my web site to something more suitable, more suitable to my user needs. Curretnly the user submits the id by the popup which comes, instead I want it to be in the form of embedded text filed. Here is my code
Code:
<script language="javascript">

function raidlk() {
	raid_link = prompt('Enter Raid ID:',"");
	location = "5man.php?rlink="+raid_link;
}
</script>
This is the code where people click to get the popup submit box
Code:
<a href=javascript:raidlk()><font color="#00FF00">__Insert Raid ID__</font>
Now what I want is something like this
Code:
<form action="5man.php" method="post">
id: <input type="text" id=id name="name" />
<input type="submit" />
</form>
I just can find out how to replace this
Code:
<?=$_GET['rlink']?>
Any help or suggestion for this.


Last edited by Solaris : 30-11-2009 at 02:14 PM.
Reply With Quote
  #2  
Old 30-11-2009
Member
 
Join Date: Oct 2005
Posts: 2,389
Re: Php form with javascript

Hi
I think this is what you are looking for, just check it out if it works for you. any more help do post back and even if you have solved the problem then post back with a solved reply.
Code:
<form action="5man.php" method="get">
ID: <input type="text" name="rlink"><br>

<input type="submit">
</form>
Best of luck.
Reply With Quote
  #3  
Old 30-11-2009
Member
 
Join Date: Apr 2008
Posts: 240
Re: Php form with javascript

Hi
Thanks for your reply
I have inserted the form box where I want it, but it is still not working. When I enter the ID it dosnt submit as the id still remains in the textbook.
Code:
<?=$_GET['rlink']?>
The code above should get the ID entered in the submit box.
Reply With Quote
  #4  
Old 30-11-2009
Member
 
Join Date: Oct 2005
Posts: 2,389
Re: Php form with javascript

Hi
I am not sure if I have any more idea to it, still i will keep trying to solve it. Not sure but you can try this
Code:
<?php echo $_GET['rlink']; ?>
If you solve this then do post back.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Php form with javascript"
Thread Thread Starter Forum Replies Last Post
Calendar javascript in a JSP form technika Software Development 4 22-02-2010 07:10 PM
How to Submit a Form Using JavaScript? Damien25 Software Development 4 07-02-2010 07:05 AM
How to set the value of a form element using Javascript? shivendra Software Development 4 07-02-2010 05:04 AM
How to use Form Validation in JavaScript? Dilbert Software Development 4 30-01-2010 08:30 PM
Help me with onChange javascript event for php form Brake Fail Software Development 3 22-07-2009 11:42 PM


All times are GMT +5.5. The time now is 03:02 AM.