☺ DA JPG ZONE ☺

willdotjpg.gay

461,937 views
226 followers
7,977 updates
0 tips
okay, i have a dev question: i have multiple pages i want to use as iframes. i want these iframes to open in a div when their link is clicked. how is this accomplished? is it a javascript thing?
willdotjpg's avatar willdotjpg 3 months ago

to be clear, i'm trying to optimize my pic-a-day calendar pages so that the individual months can be opened in a div on the main page rather than having to click through multiple pages.

chiisana-wasurenagusa's avatar chiisana-wasurenagusa 3 months ago

Sometimes I just do in html to keep js file short and simple. Just assign name attribute to your iframe and point the target to anchor. Or in js just update the src att inside of iframe. Works the same.

1 like
chiisana-wasurenagusa's avatar chiisana-wasurenagusa 3 months ago

But for your case, using fetch is the most effective. Make separate htmls for months and load them in separate divs, onclick.

1 like
arlita's avatar arlita 3 months ago

your links to the iframe pages need to have target="div-name" and the div the pages will end up inside needs to have name="div-name"

1 like
arlita's avatar arlita 3 months ago

also you can put this in ur head tag if u want all the links to go to the same div^_^

1 like
arlita's avatar arlita 3 months ago

it ate my example lolll. it's the html tag base with the attribute target="div-name" in it. srry for all the comments gl heh

1 like
arlita's avatar arlita 3 months ago

ok atp im spamming but i cant not say that that is a genius use of iframes i love it.......

1 like
heathersaturnia's avatar heathersaturnia 3 months ago

you'll need a main page 'picaday.html', a div container for your calendar(where the iframe will go) and the sidebar menu with your links that will have "target="calendariframe" to the iframe name. exmpl: < iframe name="calendariframe " src="(leave this blank or whatever month when the page loads) " class=" iframe "> < /iframe >

1 like
heathersaturnia's avatar heathersaturnia 3 months ago

in your CSS make .iframe and add some a basic width: 100%; height: 100%; border: none; position: absolute; so it fits nicely in the .calender container i hope this explanation is easy enough to understand. :V

1 like
willdotjpg's avatar willdotjpg 3 months ago

thank you all so much TvT i really appreciate the help and input

2 likes

Website Stats

Last updated 1 week ago
CreatedDec 5, 2021

Tags

blog shrines personal templates queer