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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

href anchor and reload.

Status
Not open for further replies.

dessie1981

Programmer
May 9, 2006
116
GB
Hi Guys,

I was wondering is it possible to have a href as an anchor to another script & frame and also use it to refresh the current frame.

This is the piece of code, but i can't get it to work.

Code:
<a href="servers.php#section2" Target = "mainFrame" onClick = "<?echo $_SERVER['PHP_SELF'];?>"> Blade Servers</a>

Any help would be great

Regards
Dessie
 
I'm suspicious of your literal string

"<?echo

I might be old fashioned, but although "<?" is legal, I find that opening with "<?php" avoids misunderstandings.

Further, I'm suspicious of "<?echo " being run together.

I wouldn't have high expectations if this were my code....

try "<?php echo"

D.E.R. Management - IT Project Management Consulting
 
@OP

i think your code should work in principle. on the installs that I have the problems that thedaver alludes to, do not appear and, as an old hack on this forum, i'm sure you've checked the source code to make sure the page ref is getting correctly populated in your link before posting...

but ... the js has broken down as your onClick event will look like this:

Code:
onClick="somepage.php;"

and this is not valid JS. have a look at the location object in javascript.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top