redirecting from client script...???


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 6 of 6

Thread: redirecting from client script...???

  1. #1
    srinu Guest

    redirecting from client script...???


    Hi All,

    I wants to know how can i redirect the page to some other url using client
    side script..... for example i want to show a home page when user clicks
    on cancel button.... now i am doing it as .... setting the forms action to
    home.asp and then submitting it .. but i know this is not the correct way
    ???? can anyone help me out ??

    Srinu

  2. #2
    ip266 Guest

    Re: redirecting from client script...???


    Hi,
    You can try to use the javascript "location.href" function. For eg.
    <INPUT type=button name="HomePage" value="HomePage" onclick="location.href='homepage.asp'>

    Hope this help

    "srinu" <gsri_reddy@rediffmail.com> wrote:
    >
    >Hi All,
    >
    >I wants to know how can i redirect the page to some other url using client
    >side script..... for example i want to show a home page when user clicks
    >on cancel button.... now i am doing it as .... setting the forms action

    to
    >home.asp and then submitting it .. but i know this is not the correct way
    >???? can anyone help me out ??
    >
    >Srinu



  3. #3
    srinu Guest

    Re: redirecting from client script...???


    will the code given by U will still maintain the session ? i mean there will
    not be any problems no ?? my site is ready to go online .. to do any changes
    at this point i need to be 100% sure ... Have u used it?

    srinu...

    "ip266" <ip266@yahoo.com> wrote:
    >
    >Hi,
    >You can try to use the javascript "location.href" function. For eg.
    ><INPUT type=button name="HomePage" value="HomePage" onclick="location.href='homepage.asp'>
    >
    >Hope this help
    >
    >"srinu" <gsri_reddy@rediffmail.com> wrote:
    >>
    >>Hi All,
    >>
    >>I wants to know how can i redirect the page to some other url using client
    >>side script..... for example i want to show a home page when user clicks
    >>on cancel button.... now i am doing it as .... setting the forms action

    >to
    >>home.asp and then submitting it .. but i know this is not the correct way
    >>???? can anyone help me out ??
    >>
    >>Srinu

    >



  4. #4
    ip266 Guest

    Re: redirecting from client script...???


    Yeap, session variables will be maintained as long as you are within the same
    browser (it will be maintained even you pop up new window from current window).


    "srinu" <gsri_reddy@rediffmail.com> wrote:
    >
    >will the code given by U will still maintain the session ? i mean there

    will
    >not be any problems no ?? my site is ready to go online .. to do any changes
    >at this point i need to be 100% sure ... Have u used it?
    >
    >srinu...
    >
    >"ip266" <ip266@yahoo.com> wrote:
    >>
    >>Hi,
    >>You can try to use the javascript "location.href" function. For eg.
    >><INPUT type=button name="HomePage" value="HomePage" onclick="location.href='homepage.asp'>
    >>
    >>Hope this help
    >>
    >>"srinu" <gsri_reddy@rediffmail.com> wrote:
    >>>
    >>>Hi All,
    >>>
    >>>I wants to know how can i redirect the page to some other url using client
    >>>side script..... for example i want to show a home page when user clicks
    >>>on cancel button.... now i am doing it as .... setting the forms action

    >>to
    >>>home.asp and then submitting it .. but i know this is not the correct

    way
    >>>???? can anyone help me out ??
    >>>
    >>>Srinu

    >>

    >



  5. #5
    srinu Guest

    Re: redirecting from client script...???


    Thanks ip .. i was little confused ...... thanks for the help ...


    "ip266" <ip266@yahoo.com> wrote:
    >
    >Yeap, session variables will be maintained as long as you are within the

    same
    >browser (it will be maintained even you pop up new window from current window).
    >
    >
    >"srinu" <gsri_reddy@rediffmail.com> wrote:
    >>
    >>will the code given by U will still maintain the session ? i mean there

    >will
    >>not be any problems no ?? my site is ready to go online .. to do any changes
    >>at this point i need to be 100% sure ... Have u used it?
    >>
    >>srinu...
    >>
    >>"ip266" <ip266@yahoo.com> wrote:
    >>>
    >>>Hi,
    >>>You can try to use the javascript "location.href" function. For eg.
    >>><INPUT type=button name="HomePage" value="HomePage" onclick="location.href='homepage.asp'>
    >>>
    >>>Hope this help
    >>>
    >>>"srinu" <gsri_reddy@rediffmail.com> wrote:
    >>>>
    >>>>Hi All,
    >>>>
    >>>>I wants to know how can i redirect the page to some other url using client
    >>>>side script..... for example i want to show a home page when user clicks
    >>>>on cancel button.... now i am doing it as .... setting the forms action
    >>>to
    >>>>home.asp and then submitting it .. but i know this is not the correct

    >way
    >>>>???? can anyone help me out ??
    >>>>
    >>>>Srinu
    >>>

    >>

    >



  6. #6
    vevinbabu Guest

    Re: redirecting from client script...???


    "srinu" <gsri_reddy@rediffmail.com> wrote:
    >
    >Hi All,
    >
    >I wants to know how can i redirect the page to some other url using client
    >side script..... for example i want to show a home page when user clicks
    >on cancel button.... now i am doing it as .... setting the forms action

    to
    >home.asp and then submitting it .. but i know this is not the correct way
    >???? can anyone help me out ??
    >
    >Srinu


    Hi Srinu,
    For ur problem u can directly write a script in the onclick even of the
    image.. like.. <img src="" onclick="window.location.href='home.asp';". just
    like that.. If u r using forms then depending the image clicked change the
    forms action.. like.. document.{formname}.action = "home.asp"..
    I think it solved ur problem.
    cheers,
    vinoth

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center