Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-10-24 15:30:42

Malize
Member
From: Barcelona
Registered: 2007-08-28
Posts: 77
Website

Change content without reloading the background.

Hi,

I’m building an image gallery in www.malize-photography.com. As Background weights a bit and there’s no way it could be smaller, I’d like to know if there is some way to change the content without reloading the whole page.

Something like an iframe, but without being an iframe. Is there any way to do it with tags?

Thank you in advance :)

Offline

#2 2009-10-24 15:56:00

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: Change content without reloading the background.

Malize wrote:

I’m building an image gallery in www.malize-photography.com. As Background weights a bit and there’s no way it could be smaller,

Returns a 404. Is there a typo in there?

I’d like to know if there is some way to change the content without reloading the whole page.

Something like an iframe, but without being an iframe. Is there any way to do it with tags?

You can use jquery and smd_gallery plugin


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2009-10-24 16:20:29

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: Change content without reloading the background.

The idea of changing content without reloading the whole page is what is popularly known as AJAX.

This is not something TXP-specific but rather web development specific.
You may want to investigate the jQuery AJAX documentation and the “load()” method to craft a solution. Again, at a first glance and on a basic approach, this is not related to how TXP works or how could you use tags for the task.

As Background weights a bit and there’s no way it could be smaller, I’d like to know if there is some way to change the content without reloading the whole page.

Once the image is downloaded for the first time, it should be cached on visitor’s computer, so it shouldn’t be downloaded again and again when visitor choose to visit another content that uses that same background image…


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#4 2009-10-24 17:47:21

Malize
Member
From: Barcelona
Registered: 2007-08-28
Posts: 77
Website

Re: Change content without reloading the background.

colak wrote:

Bq. Returns a 404. Is there a typo in there?

How odd, I just check and it was working.

Thank you very much, I’ll investigate about :)

Offline

#5 2009-10-24 19:57:23

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: Change content without reloading the background.

Offline

#6 2009-10-24 23:13:39

Malize
Member
From: Barcelona
Registered: 2007-08-28
Posts: 77
Website

Re: Change content without reloading the background.

Gug, thank you but I can’t reduce the background. It simply doesn’t work with horizontal screens. Anyway, there’s a second thing why I’d love to use this feature.

Offline

#7 2009-10-25 01:29:46

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: Change content without reloading the background.

Malize schrieb:

Gug, thank you but I can’t reduce the background. It simply doesn’t work with horizontal screens. Anyway, there’s a second thing why I’d love to use this feature.

It’s the same background with 1500 × 1077 pixels. (Perdón, pero no sé escribir bien el inglés).

Offline

#8 2009-10-25 12:00:43

Malize
Member
From: Barcelona
Registered: 2007-08-28
Posts: 77
Website

Re: Change content without reloading the background.

Pues eso, que precisamente lo que no quiero es reducir el fondo.

(And translation to avoid being rude: I don’t want to resize the background).

Offline

#9 2009-10-25 12:43:57

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: Change content without reloading the background.

What do you mean with resize? The new picture has the same size in pixels! The difference lies in the KBs.

Offline

Board footer

Powered by FluxBB