Click here to Skip to main content
15,888,461 members
Home / Discussions / JavaScript
   

JavaScript

 
GeneralRe: Regular expression Pin
n.podbielski23-Nov-12 21:15
n.podbielski23-Nov-12 21:15 
Questionform validation Pin
therainking7821-Nov-12 22:07
therainking7821-Nov-12 22:07 
AnswerRe: form validation Pin
Richard MacCutchan21-Nov-12 22:17
mveRichard MacCutchan21-Nov-12 22:17 
GeneralRe: form validation Pin
therainking7828-Nov-12 13:14
therainking7828-Nov-12 13:14 
AnswerRe: form validation Pin
bVagadishnu28-Nov-12 11:14
bVagadishnu28-Nov-12 11:14 
GeneralRe: form validation Pin
therainking7828-Nov-12 13:17
therainking7828-Nov-12 13:17 
Questionopeing a new window in JS after time interval Pin
WaqasCheema20-Nov-12 23:36
WaqasCheema20-Nov-12 23:36 
AnswerRe: opeing a new window in JS after time interval Pin
AnalogNerd30-Nov-12 4:51
AnalogNerd30-Nov-12 4:51 
Look into the .ajax method from JQuery, it will let you make an asychrnous call to get the next URL from the Db.

I don't know much about what technology you're using, but you could do something like this:

C#
$(document).ready(function() {
    $(#surf).click(function() {
       // setInterval will run the function once a second with this code
       setInterval(GetNextUrlAndDisplayIt, 1000);

    });
});

function GetNextUrlAndDisplayIt() {
 $.ajax(
        {
           url: 'UrlForGettingNextURL.aspx',
           cache: false,
           success: function(data) {
               window.open(data, "myWindow")
           }
}


Calling window.open and using the same name will mean it will open the next URL in the same window.

I'm making a few assumptions here, like that your "surf" button has the id "surf" and that your call to get the next URL returns just the URL and there's no parsing needed.

All in all that code should get you started.

EDIT: Obviously you will need to have some kind of way to know which URL you retreived last as well.
QuestionDraw circuit diagram using javascript Pin
anishkannan18-Nov-12 22:31
anishkannan18-Nov-12 22:31 
AnswerRe: Draw circuit diagram using javascript Pin
n.podbielski19-Nov-12 21:07
n.podbielski19-Nov-12 21:07 
Answerto transfer items in select list to another select list without duplicates Pin
raviteja999200014-Nov-12 20:09
raviteja999200014-Nov-12 20:09 
QuestionHow does Yandex do its trick? Pin
Xarzu14-Nov-12 19:42
Xarzu14-Nov-12 19:42 
AnswerRe: How does Yandex do its trick? Pin
Manfred Rudolf Bihy14-Nov-12 20:44
professionalManfred Rudolf Bihy14-Nov-12 20:44 
Questiondisplay record from two different time Pin
uti123fil8-Nov-12 17:15
uti123fil8-Nov-12 17:15 
AnswerRe: display record from two different time Pin
Richard MacCutchan8-Nov-12 23:47
mveRichard MacCutchan8-Nov-12 23:47 
QuestionAdding a month to the current date Pin
SadiqMohammed6-Nov-12 23:48
SadiqMohammed6-Nov-12 23:48 
AnswerRe: Adding a month to the current date Pin
Richard Deeming7-Nov-12 2:00
mveRichard Deeming7-Nov-12 2:00 
GeneralRe: Adding a month to the current date Pin
SadiqMohammed7-Nov-12 18:31
SadiqMohammed7-Nov-12 18:31 
GeneralRe: Adding a month to the current date Pin
Richard Deeming8-Nov-12 2:11
mveRichard Deeming8-Nov-12 2:11 
GeneralRe: Adding a month to the current date Pin
SadiqMohammed8-Nov-12 19:08
SadiqMohammed8-Nov-12 19:08 
AnswerRe: Adding a month to the current date Pin
deepak.m.shrma19-Nov-12 18:07
deepak.m.shrma19-Nov-12 18:07 
GeneralRe: Adding a month to the current date Pin
Peter_in_278019-Nov-12 18:58
professionalPeter_in_278019-Nov-12 18:58 
GeneralRe: Adding a month to the current date Pin
deepak.m.shrma19-Nov-12 19:52
deepak.m.shrma19-Nov-12 19:52 
QuestionNeed to pass object value from javascript to php Pin
gern844-Nov-12 10:08
gern844-Nov-12 10:08 
SuggestionRe: Need to pass object value from javascript to php Pin
n.podbielski4-Nov-12 12:56
n.podbielski4-Nov-12 12:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.