Home Events! Entrance Everyone Wiki Search Login Register

Welcome, Guest. Please login or register. - Thinking of joining the forum??
November 22, 2024 - @688.22 (what is this?)
Forum activity rating: Three Stars Posts: 37/1k.beats Unread Topics | Unread Replies | My Stuff | Random Topic | Recent Posts    Start New Topic
News: :4u: ~~~~~~~~~~~  :4u:

+  MelonLand Forum
|-+  World Wild Web
| |-+  ✁ ∙ Web Crafting
| | |-+  GUIDE: How to fix links on a frame site! - MK Frame-Link System


« previous next »
Pages: [1] Print
Author Topic: GUIDE: How to fix links on a frame site! - MK Frame-Link System  (Read 10324 times)
Melooon
Hero Member ⚓︎
*****


So many stars!

⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: melon
iMood: Melonking
Itch.io: My Games

View Profile WWW

Thanks for being rad!a puppy for your travelsAlways My PalFirst 1000 Members!spring 2023!Squirtle!!!!MIDI WarriorMIDI Warrior1234 Posts!OzspeckCool Dude AwardRising Star of the Web AwardMessage BuddyPocket Icelogist!OG! Joined 2021!...
« on: January 10, 2022 @936.08 »

 :defrag: :defrag: :defrag: Hi all, a quick guide here with a free script!

As some of you know Im a fan of frames sites, those are sites that use the frameset system for page layout. If you need help with frames have a look at my site and a look at this tutorial too https://www.tutorialspoint.com/html/html_frames.htm.

The big issue with frameset sites though is that they don't save browser history properly, you cant share links to sub pages and the back button does not work.. crappy stuff! BUT I have a fix for all of that and I'll share it here! Example: Instead of just going to https://melonking.net/melon, you can now visit https://melonking.net/melon?z=/links to jump to a particular framed page.

PREMADE TEMPLATE:
I have attached "frames-template.html" this is a template frame site layout you can download and use! It also explains a little about how to modify the frames! (If you download the template you don't need to install the script yourself, its pre-setup :grin:smile:

How to Install (Works for iFrame sites tooo!!)
Add this code to the <head> of your frameset page or main page containing your iFrame (Typically your index.html)
Code
<script src="https://melonking.net/scripts/frame-link.js"></script>

Then add id="mainframe" to your main <iFrame> or Frameset <frame> tag.

Done!

Optional Steps
Optional: Create a second <script></script> section AFTER you link the frame-link.js
Optional: add updateTitle = false; if you want to disable title updating. (Default is true)
Optional: add titlePrefix = "My Site "; if you want to add a prefix to your titles. (Default is none)
Optional: add pageParam = "z"; if you want to change the url path of your pages. (Default is z)
Optional: if you use a Hit Counter add hitCounterFunction = function () { XXX MY HIT COUNTER CODE }, this function will automatically be called each time someone click a page, so you can log per page hits within your frame.

The GoatCounter documentation is currently offline, so I cant provide a pre-made hitCounterFunction for you, but I'll add one in the future if the documentation ever comes back!

* frame-template.html (1.37 kB - downloaded 272 times.)
« Last Edit: May 25, 2022 @620.89 by Melooon » Logged


everything lost will be recovered, when you drift into the arms of the undiscovered
cinni
Full Member ⚓︎
***


believe in your dreams <3

⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: cinni

View Profile WWW

First 1000 Members!OG! Joined 2021!
« Reply #1 on: January 26, 2022 @436.08 »

i was super excited to try this out, till i got to the disclaimer... LOL

NOTE: If you use one of those fancy iframe sites (like cinni.net) this guide will not work for you directly, but it can be easily adapted to suit your site too! Ask in the comments if you need help with that and Ill figure it out.

either way, i've been wanting to do something like this one day cuz that's the one thing i dont like about iframes :-O
Logged

Melooon
Hero Member ⚓︎
*****


So many stars!

⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: melon
iMood: Melonking
Itch.io: My Games

View Profile WWW

Thanks for being rad!a puppy for your travelsAlways My PalFirst 1000 Members!spring 2023!Squirtle!!!!MIDI WarriorMIDI Warrior1234 Posts!OzspeckCool Dude AwardRising Star of the Web AwardMessage BuddyPocket Icelogist!OG! Joined 2021!...
« Reply #2 on: May 25, 2022 @604.81 »

This has been updated to support iFrames!
Logged


everything lost will be recovered, when you drift into the arms of the undiscovered
PurpleHello98
Full Member ⚓︎
***


'Cause I'm your girl, hold me baby <3

⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: purplehello98

View Profile WWW

First 1000 Members!Joined 2022!
« Reply #3 on: July 14, 2023 @168.45 »

Does anyone know how to make this work with div ids? I'd like to link to specific blog posts on my blog page and I give them all IDs based on the post title, like, for example "is-twilight-alright" for my most recent post. When I try to navigate to the individual blog HTML file outside of the frameset (like https://purplehello98.neocities.org/blog/frame#is-twilight-alright), the IDs work fine, but when I try to go to the post in the frameset (like https://purplehello98.neocities.org/main?z=/blog/frame#is-twilight-alright) it doesn't work. Does anyone know how to make it work short of just making every post its own page?
Logged

"...And we are not angels, to be comforted by seeing the means for which everything is sent."
-Elizabeth Gaskell, Wives and Daughters



asterhalloween
Casual Poster ⚓︎
*


the beauty of experiencing the world

⛺︎ My Room
SpaceHey: Friend Me!
iMood: mythicalwaters

View Profile WWW

First 1000 Members!Joined 2023!
« Reply #4 on: October 13, 2023 @705.58 »

It took me a bit to figure out what I was doing but oh my goodness it works! I am making my site awesomer and awesomer by the second :evil: thank you!! :grin:

I swear, coding always finds new ways to feel magical. I love it!!
Logged

:4u: Love makes the world go round! :transport:
Melooon
Hero Member ⚓︎
*****


So many stars!

⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: melon
iMood: Melonking
Itch.io: My Games

View Profile WWW

Thanks for being rad!a puppy for your travelsAlways My PalFirst 1000 Members!spring 2023!Squirtle!!!!MIDI WarriorMIDI Warrior1234 Posts!OzspeckCool Dude AwardRising Star of the Web AwardMessage BuddyPocket Icelogist!OG! Joined 2021!...
« Reply #5 on: October 14, 2023 @640.35 »

I swear, coding always finds new ways to feel magical. I love it!!

i rember back when I first made this script feeling exactly like this; I dunno why it’s such a simple script, but it’s just so useful and I don’t know of anything else like it. I’m glad you got it working too  :ozwomp:
Logged


everything lost will be recovered, when you drift into the arms of the undiscovered
tohar
Newbie ⚓︎
*

⛺︎ My Room

View Profile WWW

Joined 2023!
« Reply #6 on: November 17, 2023 @368.31 »

Hello !!!  :cheerR:
my name is tohar from mypillowfort.neocities.org , and ive been having problems with this script :,)
i have used it before in my older website snals.neocities.org and it worked PERFECTLY loved it smm but it seems to be not working at https://mypillowfort.neocities.org/blog for some reason?
i would be so happy if anyone could help me with this :)) i thought it could be because it isnt the homepage but im not sure , thanks anyway!!! ^_^   :ha:  :grin: (i love these emojis sm omg)
Logged
Melooon
Hero Member ⚓︎
*****


So many stars!

⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: melon
iMood: Melonking
Itch.io: My Games

View Profile WWW

Thanks for being rad!a puppy for your travelsAlways My PalFirst 1000 Members!spring 2023!Squirtle!!!!MIDI WarriorMIDI Warrior1234 Posts!OzspeckCool Dude AwardRising Star of the Web AwardMessage BuddyPocket Icelogist!OG! Joined 2021!...
« Reply #7 on: November 17, 2023 @753.44 »

i thought it could be because it isnt the homepage but im not sure
That's not the issue ^^

It looks like you have setup the script just fine, but you have not setup any links to actually change what's in your iFrame (that's unrelated to this script).

Normally when you want links to open in an iFrame you need to use the target parameter in combination with a name parameter.
e.g. We make an iframe with the name "main" and then a link that targets "main".
Code
<iframe src="myfile.html" id="mainframe" name="main" />
<a href="mylink.html" target="main">Link</a>
It looks like you didn't do this on your old site too; you were using full URLs instead of file names.. which is definitely not the best way to do it, but it tricked the script into working  :tongue:
Logged


everything lost will be recovered, when you drift into the arms of the undiscovered
tohar
Newbie ⚓︎
*

⛺︎ My Room

View Profile WWW

Joined 2023!
« Reply #8 on: November 18, 2023 @460.74 »

THANK YOU SO MUCH MELON IT WORKS PERFECTLY !!! :grin:  :grin:  :grin:
Logged
Salty
Jr. Member ⚓︎
**


Internet Renaissance Woman

⛺︎ My Room
StatusCafe: saltedslug
iMood: saltedslug
PicMix: saltedslug

View Profile WWW

First 1000 Members!G4 Club Member!Joined 2023!
« Reply #9 on: March 10, 2024 @777.40 »

thank you for this; I will definitely be using this for the new version of Salty's lair!!!
Logged

Pages: [1] Print 
« previous next »
 

Vaguely similar topics! (3)

GUIDE: Melon's Simple X3D World Tutorial

Started by MelooonBoard ♺ ∙ Web Crafting Materials

Replies: 5
Views: 4755
Last post February 17, 2022 @637.75
by demonologi
Collecting 90s Texture CD Links

Started by MelooonBoard ✎ ∙ Art Crafting

Replies: 11
Views: 9119
Last post October 18, 2023 @880.69
by WynnDawnstrider
How to use a forum?! - A guide for those who have forgotten/never knew!

Started by MelooonBoard ⛄︎ ∙ Forum Info & Questions

Replies: 2
Views: 4136
Last post April 22, 2023 @739.62
by Aloe

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021, Simple Machines | Terms and Policies Forum Guide | Rules | RSS | WAP | Mobile


MelonLand Badges and Other Melon Sites!

MelonLand Project! Visit the MelonLand Forum! Support the Forum
Visit Melonking.Net! Visit the Gif Gallery! Pixel Sea TamaNOTchi