Need help in refreshing page after creating a picture {GD}

images php coding issues or problems here.

Moderators: macek, egami, gesf

tamill
New php-forum User
New php-forum User
Posts: 8
Joined: Tue Aug 23, 2005 5:55 pm

Need help in refreshing page after creating a picture {GD}

Postby tamill » Sat Oct 22, 2005 7:44 pm

Hi friends,
I am a college student doing my project in php.

I will have to create a picture u GD library the send the picture to someones mail as desired.

I have created the picture in one page.

well on pressing the <preview picture> button.

and using this imagejpeg($background,"",100);

the modified picture appears.
<disadvantage is i could no add buttons and other things when i use the above code>


but using this
imagejpeg($background,"completed.jpg");
imagedestroy($background);

and using <img src="completed.jpg"> the picture of the preview edit option was displayed.

then after pressing the refresh button the new picture is displayed.

is there any way to refresh the page & display the current image.


to be more clear i will specify the project of mine with screenshots.


Intially i will have to create a e greeting like thing using the following selecting the font & bgcolor etc.

Screenshot 1:


Image


ScreenShot 2:

After pressing the Preview Before Send Button:


Image



Ok Next Going back using the go back button returns to the previous page



Next I am making some changes in the font color alignment.

Screen shot 3:

Image

Then Pressing the Preview Before Send Button again:


Image

It shows the image edit previously,

then after pressing the Refresh Button in the browser.

the following appears.

Image

What i want is. when ever i go back & make some changes. i want the change to be reflected immediately with out pressing the refresh button.


If any one of u have any idea. please help me.


And Can we fix the lenght of the characters to be diaplayed per line using the imageTTF functions.

Thanks in advance.

Tamil

User avatar
Alexej Kubarev
Site Admin
Site Admin
Posts: 2223
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län
Contact:

Postby Alexej Kubarev » Sun Oct 23, 2005 1:59 am

i think meta tag no-cache would help..
the problem is that browser doesnt refresh the cache. So this is mostly the cache problem.

there are several different ways and i dont remember any of them.. :(

ahh: here

<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">

User avatar
Alexej Kubarev
Site Admin
Site Admin
Posts: 2223
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län
Contact:

Postby Alexej Kubarev » Sun Oct 23, 2005 2:00 am

both should be included

tamill
New php-forum User
New php-forum User
Posts: 8
Joined: Tue Aug 23, 2005 5:55 pm

Postby tamill » Sun Oct 23, 2005 8:58 pm

thanks i will try & say

User avatar
ruturajv
php-forum Super User
php-forum Super User
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India
Contact:

Postby ruturajv » Sun Oct 23, 2005 9:44 pm

what you need to do is...
have a page which just renders the image, by taking parameters in GET
and then when you want to change the page,
with DOM, change the img src to a new img with different GET parameters to same page

User avatar
Alexej Kubarev
Site Admin
Site Admin
Posts: 2223
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län
Contact:

Postby Alexej Kubarev » Mon Oct 24, 2005 10:29 am

ruturajv: why so complicated?!
doing it throught blocking canching wirks fine while working with GD2..


Return to “PHP coding => Images”

Who is online

Users browsing this forum: No registered users and 1 guest

cron