...

View Full Version : Form / Link questions.



savorxit
08-27-2008, 07:53 PM
Hey. I actually have a couple questions here dealing with an HTML/PHP/javascript page that inserts into a database using an HTML form.

My first question is: instead of an <INPUT TYPE='submit'> button, is it possible to use a link to submit a form?

Secondly, I have a popup window that inputs the data into the database using this link:


<A HREF='ViewAccounts.php' onClick='window.open(\"InsertAccount.php\", \"Insert\",
\"title=Insert, toolbar=no, directories=no, resize=no, menubar=no,
location=no, scrollbars=no, width=900, height=200, maximize=null,
top=2, left=50\");'>

Is it possible to refresh ViewAccounts.php after submitting the form in the popup?


Thank you,
-Tim

Cranford
08-27-2008, 08:00 PM
Change the style of the submit button to resemble an anchor link:

http://codingforums.com/showpost.php?p=727310&postcount=9


You can execute:


window.opener.location.reload(true);

from the pop-up. The true will "force" a reload from the server, instead of the cached document.

You probably should be using AJAX though, both to update the database, and to then display the updated information.

savorxit
08-27-2008, 08:14 PM
The submit botton is working well but I still would like my hover effects. I tried this and it did not work:


<INPUT TYPE='submit' VALUE='Submit' CLASS='submitBtn' onMouseOver='this.className=submitHvr'
onMouseOut='this.className=submitBtn'>

Also, where do I put the 'window.opener.location.reload(true);'? I put it under onClick in the submit button but it did not seem to work.

Cranford
08-27-2008, 08:22 PM
Did you even think to write "thank you"?

I'm finished. Someone else can choose to offer help.

savorxit
08-27-2008, 08:37 PM
...? you sound like my girlfriend. I was just trying to clarify your responce before I actually resolved my problem. I would have thanked you if I knew where you wanted me to just 'execute window.opener.location.reload(true);'

chill out man.

Cranford
08-27-2008, 10:10 PM
You "would have thanked" me? Hmm. I'll bet you say that a lot to your imaginary girlfriend.

And I'm to, "chill out." I wonder how many more times your boss, and others, will tolerate you saying that to them.

"I would have been on time this morning, but... chill out."
"I would have remembered your birthday, but... chill out."
"I would have paid you on time, but... chill out."
"I would have finished the job on time, but... chill out."

You have extraordinary inter-personal skills. Certainly, you are at this very moment, being considered for a senior management position.

Let me quickly step aside, so that I'm not trampled by the rush of those who will now come to your assistance.

uncrocks
08-28-2008, 02:48 AM
You really need to chill Cranford it really isn't that big a deal...:cool:

savorxit
08-28-2008, 03:38 PM
Seriously?

This kind of stupid to get into on a coding forum, but if you want a "thanks" for your work everytime you do something -- you're in the wrong business.

Anyway, You didn't really resolve my problem so why would I thank you? I asked if I could use a link as a submit button, not if I could change the style of my submit button -- I know css.

I'm sorry I came here for help I guess.



THANKS



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum