Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hiding a URL using onclick 1

Status
Not open for further replies.

Zych

IS-IT--Management
Apr 3, 2003
313
US
Hey people,

I want to hide a URL by using onclick. This works well in most ways but one. I have it set to hide all buttons, menus, etc. However it states the URL in the top blue section of the site opened. How can I hide this? Is there a way to display something else? I have no control over the web site that is opened up in the window as it belongs to another company. If this does not work I may try and use frames.

Thx,

Zych
 
I think that the frames solution is the only way you are going to achieve this.

Jeff
 
This begs the question of Why do you want to hide someone else's website within your own? There are typically lots of legal reasons NOT to do this.

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
you could do something like this

Code:
<html>
<head>
<script type="text/javascript">
function hidetext(){
document.getElementById('link').style.visibility="hidden";
}
</script>
</head>

<body>
<div id="link"><a href="#" onclick="hidetext()">Link1</a></div>
</body>
</html>
 
The reason this is being done is because it is in a members only site. When the membership expires they should no longer have access to certain sites. The real clever people will be able to get around this anyways. We are just trying to get the majority. I guess I can call a page that just has one big frame in it. I have not really played with frames too much but it may be the only choice.
 
Thanks Clive, I made one with a small frame at the top taking 5% and then the main site taking 95%. It looks like it is working well. I need to test it with a couple of the real links and see what they do.

- Zych
 
at least the asp version of it, look try this

save as test.asp - replace yoursite.com with your url
now the images from the other site would need absolute urls for this to work correctly

<%
strURL =" Dim objXML
Set objXML = Server.CreateObject("Microsoft.XMLHTTP")
objXML.Open "GET" , strURL , False ,"",""
objXML.Send
if Err.Number = 0 Then
if objXML.Status = 200 Then
strOpen = objXML.ResponseText

response.Write strOpen
Else
Response.Write "Incorrect URL"
End if
Else
Response.Write Err.Description
End if
Set objXML = Nothing

%>

now there is a javascript version of this (xml.http) but i'm leaving now so i won't get into it (it's a little more work to put together, than this)
 
Hey Steve,

Nice script but I know nothing of ASP. I have done CF in the past and am know teaching myself PHP and it seems like HTML all over again. LOL

Since this is hosted on a Linux box I do not think the asp will work. I think I will stick with CliveC's idea of using just one large frame. At least for now. One of the URL's will not work in a frame for some reason but luckily this one does not need to be hidden. Anyways the other sites have there names all over them so any smart person will be able to do a google search and find them. I just have to count on stupid lazy visitors. LOL.
 

If you have a members only site, why not use a login-based system with security checks on each page?

That way, you will not need to hide the URL at all - if annyone who is not logged in goes directly to a URL, they could get sent to the login / registration page.

That would seem to me to be a far more appropriate and professional solution than simply hiding the URL.

Hope this helps,
Dan


[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top