• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 2. Start Me Up! > Redirecting the User with a Link

Redirecting the User with a Link

When a user loads the script in the previous example, they go to an initial page, then depending on the result of the script, the browser automatically loads another page. This method always lets users see at least a flash of the first page before they're sent to the second page. That isn't especially elegant, so Script 2.8 shows you a better way to accomplish the redirection, by embedding the redirection in a link. Figure 2.6 shows the starting point for users. When they click on the link, they'll be taken to one of two pages, depending on whether or not they have JavaScript.

Figure 2.6. This page has the link that contains the redirection code.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint