I wonder whether someone could help me please.
I've been working on, and I've managed to put together this jQuery Modal Dialog box and it works fine.
What I'm now trying to do is to link this page to the dialog box via a button click, to be specific the 'Upload Image(s)' button.
On the button click, the dialog box correctly appears on screen, but rather than it hovering over the main page which it's called from, it appears on a seperate web browser page.
I've been working on this for days now and I just can't seem to get around the problem. I don't think the problem is with the dialog box code, but most likely in how I call the opening of it. i.e. having two submit buttons on the main form, means that I have called the page as shown below
because I wasn't sure how to deal with both of the 'submit' buttons for this particular scenario.
<form name="savemyfindstolocation" id="savemyfindstolocation" method="post" action="testdialog.php">
I just wondered whether someone could perhaps take a look at this please and let me know where I've gone wrong.
Many thanks and kind regards
You're going absolutely wrong mate. You have created a form with the action as testdialog.php which is the dialog form, if I'm not wrong.
You've given the button Upload Image as type="submit", which would SUBMIT the form ofcourse, as it is doing now.
To open a dialog, you will require to use either an input button with type="button" or a link/anchor with an onClick event.
Can you please tell where is your dialog located and how are you working with the dialog?
Related
I have the beneath page and when i need to enter another education background so i enter it in a html base.
http://i.stack.imgur.com/6mnA7.jpg
As i am newbie in PHP so i need help in this regard.
I wanted to ask that is there a way to make it dynamic i mean when i click on that plus sign then a form form should come the first row without refreshing the page and by clicking on submit button it should save to database and come to the first row.
Like stackoverflow.com comment section.
You would need to use preventdefault on the event object.
Please check here for further clarification..
FIXED, Wrapping the input tag with an anchor tag around it seemed to
have worked.
The question could sound a bit confusing, let me elaborate.
I have made a mail form with PHP. This form is all the way at the bottom of the page.
When I click send (this is an input tag), if there are errors, it will display them above the form.
But when you click on send the page will first go back to the top and you have to scroll all the way down to see if you have made any errors.
So is it possible to keep the page from jumping back the the start?
You could have a page anchor on the form and point at that anchor in the form action, something like this should do that for you.
<form action="someformaction.php#form-anchor" id="form-anchor">
</form>
Now when the form is submitted it should move the page down to where that anchor is.
By the sounds of it, you are submitting a normal form which in turn sends the email.
You can possibly put an anchor at the bottom of the page and have the action of the form point to it, so that your user will open up on that part of the page, or you could submit via a ajax instead which will not cause a page reload. Here are a bunch of tutorials you could adapt to your code.
I have seen a few of these floating about however I want to use it different to the way they posted on here.
I have all my server validation (for register page) at the top of the page so the form submit looks like (im on index.php so it just does it's self):
However, the index.php page has a login button and a register button and the form pops up depending which you click.
However i need that div to act like a page, so you submit and it reloads the div as if it were a web page if that makes sense?
Thanks for reading :-)
I have a webpage that contains a form, and i need to refresh the page right before the form is submitted. Is there a way to have the Submit button refresh the current page and then submit the form to the proper php document?
I am using a general form with the submit button looking like
<input name="Submit" value="Submit" type="submit" />
Fix the page - do not pursue making this problem larger than it already is. I think it's some tunnel vision, you've made some mistakes on how you have setup your form or page, and now you are trying to continue down the wrong path instead of correcting your original problem.
Refreshing the page to submit some javascript data and then submit the form etc... is incorrect and needs to be fixed.
Best of luck and happy coding!
You can give the form a target to submit it in a new window and bind an event handler to it that refreshes the page on submit.
Please clarify what exactly you're trying to achieve. If you're trying to get some data from the server that's required to submit the form, it's possible to do (though it's not the best way to handle it). You'll need to intercept form submit, stop the events, perform an AJAX request to the server and then submit the form from code.
So I am making a site on dreamweaver and I cant figure out on my register page how to make it so when you press enter on the last box you need to fill in (email box) that it will automatically submit the info... instead it just deletes the stuff in that box... The only way to submit it is by actually pressing the submit button... anybody know how to do this? Thanks alot
Sounds like a tab order issue to me, make sure the submit is in the tab order right after the last input box. Also, you could do as the other suggested and use javascript to fire submit form event when the enter button is pressed.