The Page To Refresh And Proceed To Next Question Instead Of Having Pop Ups?

Nov 22, 2011

How to create forms, like survey forms using javascript. I cannot ask all my questions at once as they differ according to user's answer. The tutorials and examples I found on the web are more to how to check whether user's inputs are within numbers for the "phone", which is not useful for my case.My form is simple, the user will only submit an answer to every question, although there will be a few options given. Currently i am thinking of creating buttons with options on it and the user can click on the desired answer.

Then the page needs to refresh to the next question (as mentioned earlier, the question depends on the user's answer to previous question. There will be no true or false answer.What i have done currently is up to : ask question 1, and created yes, no and maybe buttons, and different messages will appear in a pop up window according to user's answer. This is NOT what I want, i want the page to refresh and proceed to next question instead of having pop ups. as I mentioned, there is no true and false answer. Every answer by the user is like a command to what question should be called next.

View 1 Replies


ADVERTISEMENT

Alert With Two Options (proceed Or Back To Previous Page)

Jan 27, 2004

<script language="JavaScript" type="text/javascript">
if (confirm("Are you sure to delete?"))
{
self.location = 'delete.php'
} else {
history.go(-1);
}
</script>

The above code give an alert with two choices(confirm or cancel).
If the user clicks the cancel button, it will go to previous page.
If the user clicks the confirm button, it will go to delete.php.

I like to make it like the following.
If the user clicks the cancel button, it will go to previous page.
If the user clicks the confirm button, It will proceed reading the next code.(the next code contains the code for deleting.)

I tried to remove "the self.location = 'delete.php'" as a test.

Code:
<script language="JavaScript" type="text/javascript">
if (confirm("Are you sure to delete?"))
{

} else {
history.go(-1);
}
</script>

The above code do;
If the user clicks the cancel button, it will go to previous page.
If the user clicks the confirm button, it will proceed reading the next code. So the deleting will be done.

It seems work fine.

But if the user clicks the cancel button, It will go to prevous page and the deleting will be done.(it might proceed reading the next code)

View 9 Replies View Related

JQuery :: .ajax And Page Refresh In Firefox - Can't Send Form Data In FF Without Page Refresh

Apr 15, 2010

So my problem is that i can't send form data in FF without page refresh (though in IE7-8 everything works smoothly).

My code fragments:

View 1 Replies View Related

JQuery :: Refresh DIV With Full Page Refresh?

Aug 11, 2009

How to refresh DIV , without refresh entire page,Am having four DIV ,

DIV1,DIV2,DIV3,DIV4

I want to refresh only DIV! without affecting the DIV3,DIV4 ,

View 8 Replies View Related

Open A Small Form Window That Allows User To Input An Email Address And Update It To Proceed

Aug 30, 2011

I found this forum while running out of ideas and being extremely desperate to fixing a probably small javascript error in a script. the script is supposed to open a small form window that allows the user to input an email address and update it to proceed. the form item is initially unchecked, but as the user clicks it and enter his email address, it updates the value of the email address and the box becomes "checkable". the problem is that with both IE and firefox, the box doesn't close again, doesn't get checkable and basically doesn't work. in the firefox debugging console, I found the following error:

Quote:

The part responsible in the javascript for this section is:

Quote:

And the html code that is supposed to pop up the box is:

Quote:

View 1 Replies View Related

JQuery :: Part Page Refresh - Load Page It Does Nothing Only Blank Page

Feb 1, 2011

[Code]...

when i load page it does nothing only blank page, may have code in wrong place but not sure so can someone show me a working example so i can find out what i'm doing wrong also i would like the part of page to refresh evey 120 seconds is this possibe with jquery?

View 7 Replies View Related

Countdown To Page Refresh - Put A Short Page Of Copy On Each Address Along With Keywords Before Redirecting The User To Main Site

Aug 22, 2011

Our company own a lot of domains and want to put a short page of copy on each address along with keywords before redirecting the user to our main site. I have been able to get the page to load the main site after the desired time using this code in the head...

<META HTTP-EQUIV="refresh" CONTENT="40;URL=http://webaddress.com/">

That works perfectly, I am now trying to display a countdown timer from 40 seconds down to 0, and on 0 redirect the user. Saying something like "You will be redirected in XX seconds". Is there anyway of doing this? I've been searching google for the answers with no luck and can only seem to find timers that countdown to a set date.

View 13 Replies View Related

Jquery :: Update The Page Content Without Refresh The Page?

Oct 29, 2011

the page url is

Code:
`http://example.com/index.php?main_page=index&Path=<?php echo $_GET['Path'];?>`
there are some contents on the page:

[code]...

View 1 Replies View Related

Refresh One Div In HTML Page And Not The Entire Page?

Feb 8, 2010

I need to refresh one div in my HTML page and not the entire page, is this possible?

View 4 Replies View Related

Page Does Not Refresh

Jul 23, 2005

I'm building a suite of free php applications to create virtual worlds.
My problem is i can't get my file to refresh. Can this be done with
javascript? I would like to have the display and the form be on a single
page..unless this can be done with frames.

The sample application contains 2 files:
a)The php file (with input controls and the embedded world)
b)The embedded world (text file)

1. The php file accepts input from the user
2. The user hits Submit which creates the text file for the world
this works - the text file is created with changes. next the page
should refresh itself and show the world based on the user's input.

Right now steps 1 and 2 work perfectly in the sense that the text file
for the world does get created. however the page will still show the
older version of the text file.

To get the page to refresh properly, i have to hit the reload button on
the browser...this gives me the "this page can't be refreshed without
sending..." alert...but it then refreshes and shows the changes.

the code:

View 1 Replies View Related

How To Refresh The Page?

May 23, 2007

<img src=...Onlick = "if (!(this.temp>=640)) { this.temp=640; } if
(this.width>=640) { xyz=this.width; this.width=this.temp;
this.temp=xyz; }">

Inline script....
I got the above code from internet and it is used to change the width
of the IMG element. This not only "changes" the width but also
"refreshes" the page so that I can see the change in width.

Function script...
I moved above inline script to a JS file and it is as follows. Now,
'width' of the IMG element seem to change but display does not get
refreshed; and if I add a window.alert( ); then I see screen
refreshing Code:

View 2 Replies View Related

Page Refresh Help

Apr 26, 2006

Page1 is the main page and when I click on a link on page a pop up window opens (page2).What I would like to happen is when page2 is closed I would like page1 to be refreshed.

View 4 Replies View Related

Different Div On Page Refresh?

May 21, 2011

I have three divs with a feed:

<div>feed nr.1</div>
<div>feed nr.2</div>
<div>feed nr.3</div>

I would like to hide div 2 and three and show only div 1.Than one page refresh I would like to hide div 1 and than show div 2 etc. In this order. So every page refresh would show a different div in the order of 1,2,3 etc.

View 1 Replies View Related

Refresh Page Programmatically

Jul 23, 2005

How do I refresh the page programatically when i found the page is not loaded completely?

View 3 Replies View Related

JQuery :: Refresh Div Or Page

May 16, 2011

i have a page with products and i want to auto refresh the page or a <div> in the page , when the admin adds a new product in the DB. So the user will be able to see the to see the product without refresh the page..

View 1 Replies View Related

Refresh A Web Page Continuously?

Feb 5, 2009

How can I write a JavaScript for the following requirement. I have to go to a link say www.google.com and refresh it for every 5 seconds continuously.

View 11 Replies View Related

Page Doesn't Refresh

Apr 15, 2009

I have this script I want to use. I have 2 dropdown lists (which are both connected to mysql database). The second dropdown list is depending on the first dropdown list in order to show items from the database. I can select an item from the first dropdown, but the second remains on its default setting (kies project).Somehow the page doesn't refresh so the second dropdown list will never show items (according to the selection of the first dropdown list).

In this code there is in the option a "onSelect" part but I'm not sure if this should be there, I think it should be an onChange feature, but cant get it right.

View 6 Replies View Related

Refresh The Div (on The Right) Not The Entire Page?

Aug 18, 2009

hers the site i am working onhttp:/[url].....as you can see on this page.there are two main div(left,right)when a user clicks a link on left div accordingly an external page is loaded in the right div. when you click a link in IE the entire page is refreshed.I don't want to refresh entire page.i want to refresh the div (on the right) not the entire page.How should i go about it. Here's the link to script that i have used http:[url]......

View 5 Replies View Related

Redirect If Refresh Page

Jan 30, 2006

I would like to make a page go somewhere else if someone refreshes the page.
Please advise how I can do that.

This is an action page that should not be refreshed and want to make sure if it is refreshed it will go to another web page.

View 1 Replies View Related

Refresh The Parent Page?

Jun 1, 2011

I have the following script that refreshes the page that opened the pop up window, after the pop up window is closed.

if(window.opener && !window.opener.closed)
{
window.opener.location.reload(true);
}
window.close();

It is working fine in IE but it's not refreshing the parent page in FireFox.

View 2 Replies View Related

Refresh Page If No Movement?

Nov 20, 2009

I need to f5 a page only if there is no movement on a page/application in every 2 mins.

View 8 Replies View Related

Refresh A Div Tag With Reloading The Page?

Feb 24, 2011

I have a div tag that I want to loop through and refresh at the end of the loop. I understand Ajax is probably the best option for this but how do I refresh just the div tag alone without reloading the page?

In the title I meant to say How do I refresh a div tag without reloading the page?

View 1 Replies View Related

Keep A Variable Value On Page Refresh?

Apr 18, 2011

Is there a way to keep a variable value on page refresh, if I have

var x=0;

but then a users does somethibng that makes that value become

x=4;

and then the page is refreshed, is there a way to keep that value of 4 for the x variable or it will always reset to the original value?

View 4 Replies View Related

Prevent Page Refresh

Jul 27, 2004

Is there a way to prevent the user from refreshing/reloading a particular page? Or any way to prevent a particular form from being posted/inserted twice?

View 3 Replies View Related

Refresh Parent Page

Jun 13, 2006

I'm unsure if this is a php or javascript problem as I am new to javacript...

I am using a javascript:popup('page.php') command to open a popup box and allow the user to make a few changes to a mysql database. However the values that are changed are displayed on the parent page (the one that the user clicks the popup link on).

Is there a way to refresh the parent page from the popup, so when they submit the form in the popup the parent automatically refreshes with the new values (rather than the user having to manually refresh the page)?

View 2 Replies View Related

Need Page Refresh Location

Oct 28, 2007

need some javascript that when a page is refreshed, the page will appear in the browser in a certain location down the page. Trouble is a php text link is being clicked on which causes the page refresh. Anyone know a way to show a page location after a page refresh with javascript?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved