Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Linking inside a iframe

So im trying to copy a site the site hs a side bar

http://prntscr.com/siicq1

i have copied the functions nd got the side bar to work but ive noticed he hs links at the top inside the sidebar which links to other pages
http://prntscr.com/siidkm

He uses code like this
PHP Code

<?php 
<li class="menu-tab" onClick="membersTab('view=top_pokemon', 0); return false;">Top Pokémon</li> 

I am trying to work out what page is it calling? can i edit these to link to my own pages i have been trying most of the day but when i change the onlink and link the text it just opens the page in a new tab every time and not inside the side bar

PHP Code

<?php 
<li  class="menu-tab" ><a href="rich.php">Your Text</a></li> 

Ive also added
PHP Code

<?php 
<base target="_parent"> 
but this does not work so i simply want to edit these links at the top to go to my own pages
Not php

Also, you can’t. You’ll need your links to call javascript that will then invoke an element in the iframe. An iframe is basically just a body element and contains everything.
(May 17, 2020 11:13 AM)Charger Wrote:  Not php

Also, you can’t. You’ll need your links to call javascript that will then invoke an element in the iframe. An iframe is basically just a body element and contains everything.
PHP Code

<?php 
<li class="menu-tab" onClick="membersTab('view=local_top_trainers', 0); return false;">Local Top Trainers</li>
<
li class="menu-tab" onClick="membersTab('view=top_richest', 0); return false;">Richest Users</li>
<
li class="menu-tab" onClick="membersTab('view=top_pokemon', 0); return false;">Top Pokémon</li>
<
li class="menu-tab" onClick="membersTab('view=top_clans', 0); return false;">Top Clans</li>
<
li class="menu-tab-end menu-tab" onClick="membersTab('view=seasonal_top_trainers', 0); return false;">Seasonal Top Trainers</li> 

These are his link so what element is he calling?So i can look inside his js file for each link
(May 17, 2020 11:26 AM)Geatzo Wrote:  
PHP Code

<?php 
<li class="menu-tab" onClick="membersTab('view=local_top_trainers', 0); return false;">Local Top Trainers</li>
<
li class="menu-tab" onClick="membersTab('view=top_richest', 0); return false;">Richest Users</li>
<
li class="menu-tab" onClick="membersTab('view=top_pokemon', 0); return false;">Top Pokémon</li>
<
li class="menu-tab" onClick="membersTab('view=top_clans', 0); return false;">Top Clans</li>
<
li class="menu-tab-end menu-tab" onClick="membersTab('view=seasonal_top_trainers', 0); return false;">Seasonal Top Trainers</li> 

No. You have to select the iframe and then select the li element. Then you can do that element.click
These are his link so what element is he calling?So i can look inside his js file for each link
i have just noticed he has all ready built a function to link the pages

https://stackoverflow.com/questions/6187...e-a-iframe

can anyone tell me were the links are pointing to ?

here are my links
https://pastebin.com/dYfqT1TK


then this is the script
https://pastebin.com/DQTe3vPq


So it looks like to me its just adding .html to the end? the links work but says it cant fin the page so i need to build the pages one of the pages are ignore_list.html im guessing?
i was actually looking for something like this, perfect thank you!


Possibly Related Threads...
Thread / Author Replies Views Last Post
by StumailJan 11, 2023 11:19 PM 0 107 Jan 11, 2023 11:19 PM
Last Post: Stumail
by mcbomberMay 26, 2021 01:10 PM 0 131 May 26, 2021 01:10 PM
Last Post: mcbomber
by James BurnhamNov 21, 2019 04:52 PM 1 154 Nov 21, 2019 04:52 PM
Last Post: Nachfolger