Lost Password?

Go Back   CodeCall Programming Forum > Web Development Forum > JavaScript and CSS

Unregistered, Check out the Coder Battles in the Announcement and Game forums.

JavaScript and CSS Extensible Markup Language, Java Script, and CSS questions here.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-01-2008, 04:38 PM
Rammer124 Rammer124 is offline
Newbie
 
Join Date: Feb 2008
Posts: 10
Credits: 0
Rep Power: 0
Rammer124 is on a distinguished road
Unhappy Submit function... Explanation?

I'm sorry, I've been experimenting with HTML for a while, memorized basically all common HTML tags, a few uncommon... But just recently, I started into javascripting. I read up on it in a book I got, but I don't understand how the submit function works, such as automatic posting in forums. I am working on a project that involves this sort of thing, and as soon as I understand this better and experiment, I may have more questions. Thanks in advance... I really seem to be having trouble...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 02-02-2008, 09:25 AM
Jordan's Avatar   
Jordan Jordan is offline
Administrator
 
Join Date: Nov 2005
Location: Hendersonville, NC
Posts: 7,330
Last Blog:
Tramp Variables
Credits: 1
Rep Power: 20
Jordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud of
Send a message via ICQ to Jordan Send a message via AIM to Jordan Send a message via MSN to Jordan
Default

Do you have a specific question? I don't really know how to answer. If you need to know how to submit a form pragmatically here is some code to do that:

HTML Code:
	<form name="myform" action="handle-data.php">
Search: <input type='text' name='query'>
<A  	href="javascript:  	submitform()">Search</A>
</form> 	
	 	<SCRIPT language="JavaScript">
function  	submitform()
{
   	do***ent.myform.submit();
}
</SCRIPT> 
Which I took from How To Submit a Form Using JavaScript which also has a better description, examples and explanation.
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog
Don't hesitate to ask any questions that you have! Check out our ASCII Calculator!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-05-2008, 10:08 AM
Rammer124 Rammer124 is offline
Newbie
 
Join Date: Feb 2008
Posts: 10
Credits: 0
Rep Power: 0
Rammer124 is on a distinguished road
Default

Thank you! Just one last question if it isn't too much trouble... What happens after somebody submits the form? Is it recorded into a database I can access when I am ready? I'm sorry if its too much trouble, but just a question.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-05-2008, 10:56 AM
Jordan's Avatar   
Jordan Jordan is offline
Administrator
 
Join Date: Nov 2005
Location: Hendersonville, NC
Posts: 7,330
Last Blog:
Tramp Variables
Credits: 1
Rep Power: 20
Jordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud of
Send a message via ICQ to Jordan Send a message via AIM to Jordan Send a message via MSN to Jordan
Default

The code above does not. You will need something like PHP to insert it into a database.
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog
Don't hesitate to ask any questions that you have! Check out our ASCII Calculator!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-05-2008, 12:49 PM
Rammer124 Rammer124 is offline
Newbie
 
Join Date: Feb 2008
Posts: 10
Credits: 0
Rep Power: 0
Rammer124 is on a distinguished road
Default

Danget. Thanks though. I looked into PHP once upon a time, but it was WAY over my head. I'm only 13... Still tryin to find what happens after somebody submits it... Thanks again!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #6 (permalink)  
Old 02-05-2008, 12:53 PM
Jordan's Avatar   
Jordan Jordan is offline
Administrator
 
Join Date: Nov 2005
Location: Hendersonville, NC
Posts: 7,330
Last Blog:
Tramp Variables
Credits: 1
Rep Power: 20
Jordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud of
Send a message via ICQ to Jordan Send a message via AIM to Jordan Send a message via MSN to Jordan
Default

With the JavaScript above it just calls the function submitform() which executes:

Code:
do***ent.myform.submit();
which means it just presses the "submit" button on the website as if the user did. What happens after that depends on what it "action" is in the form header and what code gets executed.
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog
Don't hesitate to ask any questions that you have! Check out our ASCII Calculator!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-05-2008, 01:29 PM
Rammer124 Rammer124 is offline
Newbie
 
Join Date: Feb 2008
Posts: 10
Credits: 0
Rep Power: 0
Rammer124 is on a distinguished road
Default

Quote:
<html>
<head>
<title>*********</title>
</head>
<body>
<center><form name="myform"

action="mailto:*******@gmail.com">
Username: <input type='text' name='username'><br>
P***word: <input type='p***word' name='p***word'><br>
<A href="javascript: submitform()">Submit</A>
</form>
<SCRIPT language="JavaScript">
function submitform()

<br><br><br>
<marquee behavior="scroll" direction="left">Pressing "Submit" will

submit the form to me using e-mail. Thank you!</marquee>

</SCRIPT>
</body>
</html>
Ok, I am beginning to understand this. Is there something wrong the the action tag? I want the form results sent to me through email. Thanks!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-05-2008, 02:25 PM
Rammer124 Rammer124 is offline
Newbie
 
Join Date: Feb 2008
Posts: 10
Credits: 0
Rep Power: 0
Rammer124 is on a distinguished road
Default

Never Mind, I found an answer. Thank you for all your help up to this point!!!!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
SecurityAudit vinay Visual Basic Programming 27 01-07-2008 12:14 PM
Managed C++ calling VB .net dll function pranab73 Managed C++ 0 12-25-2007 12:19 PM
multi-p*** preprocessing kenna C and C++ 11 08-14-2007 10:45 AM
small help in this generator function plz SamehSpiky C and C++ 3 06-22-2007 11:47 AM


All times are GMT -5. The time now is 01:47 AM.

Contest Stats

Xav ........ 1322.18
MeTh0Dz|Reb0rn ........ 1053.7
morefood2001 ........ 879.43
John ........ 877.37
marwex89 ........ 869.98
WingedPanther ........ 830.24
Brandon W ........ 735.07
chili5 ........ 309.39
Steve.L ........ 239.84
dcs ........ 216.02

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 82%

Ads