473,320 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Submit a Form without a physical click.

196 100+
Before you read below i only added that so you may understand my problem more fully, basically all i am trying to achieve is an onpage load sumbit form function.

Also i have previously tried this code with no success -

Expand|Select|Wrap|Line Numbers
  1. head>
  2. <script type="text/javascript">
  3. function formsubmit(){
  4. document.forms["myform"].submit();
  5. document.myform.submit();
  6. }
  7. </script>
  8. </head>
  9.  
  10. <BODY onLoad="formsubmit()">
  11. .
  12. .
  13. .
  14. .
  15. <input type="submit" value="Submit" name="submit" id="myform">
  16. </BODY>
  17.  
So im currently setting up a Aritcle Directory for someone else. They specifically requested that i use a piece of software called "ArticleDashboard".

Now i have successfully setup the Article Directory, BUT there are no articles in the Article Directory at all.

So I wrote some code mainly .php that can parse other Article Directorys (i.e. Not the one im working with) for Articles that can then be added to to the Directory that i am working with.

So i can successfully store this information in mysql database table, NOW the problem resides in actually storing this information into The Article Directorys database.

The first solution i tried to implement was intergrating my code with that of the Article Directorys code BUT i ran into the problem that all files/code are encrypted using ioncube which made that solution impossible to implement.

Then i tried to manually input the articles that i retrieved from other websites (Those within the ArticleDashboard Netork) directly into the Article Directorys mysql Database, what i found while reviewing the database tables for the directory im working on is that the articles are stored in some sort of binary file, that is linked to the mysql database, which also happens to be encrypted making that solution unviable.

Now the finally solution i determined which is frankly the most ad-hoc of the lot is to use the seperately stored articles i have, to dump the information into an article submission page which i modifyied to allow me to input the data automatically.

This is where what i am asking will now become obvious, so i can get each article into a submission page one at a time via simply reloading the page and it updates to the next article to submit, now the problem is at the moment i have to physically click the sumbit button so that the article will then be added to the Article Directory.

I am wondering if there is anyway around this, what i want not sure if possible though, is to have an automatic submit button so i can then use a cron job.
Jul 5 '10 #1
3 1682
RamananKalirajan
608 512MB
Hi,
document.forms["myform"].submit();

Can you please tell me why u have used like this. I know we will be submitting the form by specifying the form number over there. Like forms[0] or forms[1]. Can you please clarify me on this one. The best way to debug JS is having alert line by line. Try placing some alert and check whether ur code is executing as designed.

Thanks and Regards
Ramanan Kalirajan.
Jul 5 '10 #2
chazzy69
196 100+
actually i have 2 similar commands to submit the form -
Expand|Select|Wrap|Line Numbers
  1. document.forms["myform"].submit();
  2.  
And

Expand|Select|Wrap|Line Numbers
  1. document.myform.submit();
  2.  
They are both supposed to do the same thing, where would you suggest that i place a alert box?
Jul 6 '10 #3
chazzy69
196 100+
Figured it out turned out there was another javascript function interfering with the execuition of the script, also the script was somehow to complicated to submit. In the end i removed all excess code and simplified it right down so now it will sumbit the form automatically upon submission.

Now all i have to check is weither when you run the page as a cron job that the javascript will execute or not.
Jul 6 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: lsarg | last post by:
i've been trying forever to figure out a way to use a regular text link in place of a submit button at the bottom of this. can't get it. i'm just starting to learn php, so i'm stuck. any help at...
0
by: alexB | last post by:
You can call the sub() just like any other sub() or function() like so... Call DataGrid1_SelectedIndexChanged(sender,e ) Depending on the circumstances "sender" and "e" may be irrelevent, in...
3
by: Mark Michel | last post by:
Hi. I have made an html form which I would like to send by e-mail. When the recipient receives the e-mail form, I would like them to be able to fill it out and click the Submit button which will...
1
by: jetmarc | last post by:
Hi. I hope that .javascript is the correct group for this question. I have a device with embedded webserver. Its page offers to reset the device, with the following javascript function: ...
2
by: Terence Parker | last post by:
How does one go about submitting a form with a link - but submitting it to a new window AND to a page different to that described within the action="" option of the <form> tag? Say, for example,...
1
by: Matt | last post by:
The problem is I have 3 buttons that need to submit the form to different URL. My approach is to declare <input type="submit"> rather than <input type="button">. And put the following in the...
16
by: NathyZif | last post by:
I know I know, why would I want to submit the form from server-side code, if the only way to get to the server-side code was BY submitting the form. But that's just it, when the code-behind...
7
by: mukeshrasm | last post by:
Hi I have four textbox in form and I want to submit the form without using post or get method in php how can I do that.
5
by: huseyin | last post by:
Hello, I have two forms written mainly in php. Here how it functions currently: - First form has two submit buttons. - First submit button is a search button that submits a value of an input...
1
by: metalforever | last post by:
How do you redirect a form after submit(form sends email) ? This is pretty urgent for me. I have included the code in a pastebin. http://pastebin.org/249014 process_form sends the email. ...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.