Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-05-2012, 08:42 AM   PM User | #1
sun2dar
New to the CF scene

 
Join Date: Oct 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
sun2dar is an unknown quantity at this point
windows Modal Dialog redirect itself without opening new window

Hello I am newbie on javascript and now I need help on my project to redirect my dialog window to another dialog.
So I mean dialog1.aspx has a link that redirect itself to dialog2.aspx. I already try and it always open a new windows.
Or maybe someone has some workaround about this?

Thanks,
Sumardi
sun2dar is offline   Reply With Quote
Old 10-05-2012, 08:55 AM   PM User | #2
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,037
Thanks: 197
Thanked 2,411 Times in 2,389 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
Your visitor is supposed to be the one deciding what opens where - that's why the target attribute was made obsolete in 1997. It was only valid in HTML 3.2.
Most people don't want new browser windows opening any more and prefer either to have them open in a new tab or as an overlay on the current page.
There never has been any way to specify a new tab in HTML or JavaScript since tabbed browsers were introduced long after 1997.

All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.
__________________

All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.
Philip M is offline   Reply With Quote
Old 10-05-2012, 09:19 AM   PM User | #3
sun2dar
New to the CF scene

 
Join Date: Oct 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
sun2dar is an unknown quantity at this point
Sorry for my bad explaination before.
What I've done before are like this :

1. main.aspx
call window.showModalDialog("dialog1.aspx");

2. dialog1.aspx
<asp:button id="button1" onClick="function_click"></asp:button>

protected void function_click(object sender, EventArgs e)
{
Response.redirect("dialog2.aspx");

}

Is there any ways that I can redirect this modal dialog to other url.
And I don't know if I post this question to right forum or not. If it is not allowed here just delete it.


Thanks,
Sumardi
sun2dar is offline   Reply With Quote
Old 10-05-2012, 02:18 PM   PM User | #4
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,650
Thanks: 4
Thanked 2,451 Times in 2,420 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
This is definitely the wrong forum as it is in the Java forum. I'm just not sure if the asp forum makes more sense than the JS forum, but given the interactive nature I'd say the JS forum makes more sense.
Fou-Lu is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:47 AM.


Advertisement
Log in to turn off these ads.