• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

problems with form refresh.

Guest
Aug 17, 2011 Aug 17, 2011

Copy link to clipboard

Copied

I have been racking my brain trying to figure out how to get something to work with a form.

This is the form that is going to be used..

<cfform action="Insert.cfm" name="Create" target="_blank">

from this it should open the insert.cfm as I have a report to open at the end of insert page. This works fine.

<cfreport format="pdf" template="Detail_Printable.cfm" query="Qdetail">
</cfreport>

But I have a problem with the form. I need it to refresh as I dont want the user to have the option of submitting the form again, with out the new data being available.

Hope that makes sense.

Thank you

James

Views

2.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Aug 18, 2011 Aug 18, 2011

OK, first things first: it's not Java.  It's JavaScript.  They are two completely different and unrelated things (despite the similarity in name).

http://en.wikipedia.org/wiki/Java_%28programming_language%29

http://en.wikipedia.org/wiki/JavaScript

Second, google "javascript onsubmit handler".  There is stacks of information & tutorials & guidance out there already, so there's no point me repeating it here.

Once you get your brain around how the onsubmit handlers work, google "javascript onsubmit ope

...

Votes

Translate

Translate
LEGEND ,
Aug 18, 2011 Aug 18, 2011

Copy link to clipboard

Copied

If you need to control how the browser behaves, you need to do it with JavaScript.  Create an onsubmuit handler; submit your form to the new window; and then relocate the parent window to somewhere else.

--

Adam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 18, 2011 Aug 18, 2011

Copy link to clipboard

Copied

I have tried this Java on the opened page (_blank)

<BODY onLoad="window.opener.location.reload();">

but it does not seem to work at all.. Doesnt even try to refresh the original page.

Just to try and clarify my problem a little.

I have 2 pages.

Original Page 1, this is the one with the Form on it.

Insert and Document Page 2.

SO when a user clicks on the submit button on page 1 it opens page 2 and does an insert and then rolls to a report..

But when this happens I need the Original Page one to refresh.

Thank you

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 18, 2011 Aug 18, 2011

Copy link to clipboard

Copied

Yep, I understand it.

See my previous post (which you are replying to, but seem to not have read).

--

Adam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 18, 2011 Aug 18, 2011

Copy link to clipboard

Copied

Adam, I guess the Java is what I am needing help with.

Thank you

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 18, 2011 Aug 18, 2011

Copy link to clipboard

Copied

OK, first things first: it's not Java.  It's JavaScript.  They are two completely different and unrelated things (despite the similarity in name).

http://en.wikipedia.org/wiki/Java_%28programming_language%29

http://en.wikipedia.org/wiki/JavaScript

Second, google "javascript onsubmit handler".  There is stacks of information & tutorials & guidance out there already, so there's no point me repeating it here.

Once you get your brain around how the onsubmit handlers work, google "javascript onsubmit open new window" and read some of the stuff about how to do that.  All the info you need is already there.  Indeed there is exactly the answer you need on the first page of results.

If you get to to the point of writing some code and need help with it, then post back.  But you should be able to solve all this with Google and rolling up your sleeves 😉

--

Adam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 19, 2011 Aug 19, 2011

Copy link to clipboard

Copied

Adam, thanks for all your help. Got it working..

Thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 19, 2011 Aug 19, 2011

Copy link to clipboard

Copied

LATEST

Cool: good work.

--

Adam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation