Avatar of robrodp
robrodp
Flag for Mexico asked on

hide url from popup window. Asp code

Is there a simple way to hide the url in a popup window?
ASP

Avatar of undefined
Last Comment
HainKurt

8/22/2022 - Mon
SOLUTION
Big Monty

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
HainKurt

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
robrodp

ASKER
This is the code I have now:

<a href="editar.asp?id=<%=id%>" target="popup" onClick="window.open(this.href, this.target, 'alwaysRaised=yes,width=450,height=400,scrollbars=0,toolbar=0'); return false;"><%=part%></a>

The href shows an id number used in edit.asp?id=<%id%>

How can I implement this=?
Big Monty

add the location parameter:

<a href="editar.asp?id=<%=id%>" target="popup" onClick="window.open(this.href, this.target, 'alwaysRaised=yes,width=450,height=400,scrollbars=0,toolbar=0',location=no); return false;"><%=part%></a>
HainKurt

something like this

<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
  
<script>
$( function() {
    $( "#dialog" ).dialog({
      modal: true,
      buttons: {
        Ok: function() {
          $( this ).dialog( "close" );
        }
      }
    });
  } 
function showDialog(){
  $( "#dialog" ).load("editar.asp?id=<%=id%>").dialog( "open" );
}
);
</script>

<div id=dialog></div>
<a href="#" onClick="showDialog();"><%=part%></a>

Open in new window

Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
robrodp

ASKER
Now it open isn a new windos (no pop up) and the url

http://www.myurl/editar.asp?id=5125 is in plain sight
Big Monty

like I mentioned earlier, you won't have 100% guaranteed rate due to security issues.

it's weird you're not getting it at the very least, to pop up. Did you check your JS console for errors?
HainKurt

what about this
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
  
<script>
$( function() {
function showDialog(){
  $( "#dialog" ).load("editar.asp?id=<%=id%>").dialog( "open" );
}
);
</script>

<div id=dialog></div>
<a href="#" onClick="showDialog();"><%=part%></a>

Open in new window

⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Big Monty

@robrodp - it would also help if you could let us know which potential "solution" you are using, so we don't trip up each other.

Personally, if you're not using jquery throughout your site, I wouldn't add it JUST for a pop up box. That's like trying to kill a squirrel with a bazooka :) Are you using Bootstrap by any chance? if my latest suggestion doesn't work, and you're already using Bootstrap, they have modal dialogs that you can use.
ASKER CERTIFIED SOLUTION
HainKurt

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
HainKurt

@Big Monty

bootstraps are using jQuery already...
Big Monty

ya i realized that as soon as I hit enter, been a long day :)
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
robrodp

ASKER
Thx guys my problem is much more complicated that I thought. Your solution work. Thx for your expertise. I just realized that taht is not the problem. How can I close the question?
Big Monty

click the "accept answer button, along with any additional solutions that you think helped you
Scott Fell

>  much more complicated that I thought

Or you can delete the question or post your own solution and accept your own answer (as well as any that assisted in your decision)
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
HainKurt

2 solutions given here...

1. classic dialog using javascript which may not fit to requirements
2. jQuery PopUp which is what op needs...