•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 330,201 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,045 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 2433 | Replies: 8
![]() |
Im working on a college project. In this, the user is required to authenticate. The login page (login.asp) has the form and the corresponding ASP code. Once the user is successfully authenticated, the user is redirected to the main page(mediaguidehome.asp). Currently, on authentication, I'm using the following code to redirect the visitor:
<% asp code here %>
<SCRIPT Language="JavaScript">
location.href="/mediaguidehome.asp?user=<%=Request.Form("username")%>&pass=<%=Request.Form("password")%>"
</SCRIPT>
What I want to ask is this. Is it better to use The location.href JavaScript or do I use the HTTP Refresh statement (<META HTTP-EQUIV=Refresh CONTENT="0; URL=/mediaguidehome.asp?user=<%=Request.Form("username")%>&pass=<%=Request.Form("password")%>">
).
Please advise. Thanks.
<% asp code here %>
<SCRIPT Language="JavaScript">
location.href="/mediaguidehome.asp?user=<%=Request.Form("username")%>&pass=<%=Request.Form("password")%>"
</SCRIPT>
What I want to ask is this. Is it better to use The location.href JavaScript or do I use the HTTP Refresh statement (<META HTTP-EQUIV=Refresh CONTENT="0; URL=/mediaguidehome.asp?user=<%=Request.Form("username")%>&pass=<%=Request.Form("password")%>">
).
Please advise. Thanks.
Touch eyeballs to screen for cheap laser surgery
•
•
Join Date: Jan 2005
Location: Sheffield, UK
Posts: 294
Reputation:
Rep Power: 4
Solved Threads: 5
As you are using ASP, why not just using respose.redirect function in asp?
Ecommerce-Web-Store.com Building Your e-Business.
•
•
Join Date: Jan 2005
Location: Sheffield, UK
Posts: 294
Reputation:
Rep Power: 4
Solved Threads: 5
This is human! When a salesman asked whether you want to buy a red one or a blue one, you never think about saying "I don't need any" or "I prefer the white one"...
Good luck goldeagle.
Good luck goldeagle.
Ecommerce-Web-Store.com Building Your e-Business.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
DaniWeb Marketplace (Sponsored Links)
- starware popups and redirect (Viruses, Spyware and other Nasties)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Making T.Greer's JavaScript-synthesised combobox dynamic
- Next Thread: menu template



Linear Mode