|
hi, does anyone know how i can refresh a webpage only if a certain variable is equal to some value in particular:
ex->
int a;
//get a from user using scanf
if(a==7)
//refresh webpage
else
//printf a message
thanks
porac69
|
|
|
|
|
I wrote a nice long reply originally but accidently closed the damn window...
Basically...what I suggested is you to execute to redirects..
Original to temp
Temp to original
using:
if(a==10){
printf("Location: http://www.domain.com/script2.cgi");
printf("Location: http://www.domain.com/script1.cgi");
}
You could maybe try redirecting to the exact same page using the SCRIPT_NAME environment variable...if that is what its called...???
You will have to let the browser know not to use it's cached version though with the following headers I stole from a PHP script I have:
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
gmdate() is a PHP function you'll have to find the equivelant in the CRT or library your using...
Replace header( ) with printf()
HTH
Cheers
How do I print my voice mail?
|
|
|
|
|
I have a problem with Jmail .
I use JMail to check mail and then download mail and send this to other mailbox .So i received an error :
" jmail.Messages error '8000ffff'
POP3: -ERR Can't open the message file - it's gone! "
Please , help me !
Thank you very much .
|
|
|
|
|
Hi!
I am having a problem getting rid of the status-bar in
a modelessdialog running under Internet Explorer 6.0,
Windows XP ServicePack2...
status parameter is set to "status:no", but still
it shows.
codecut:
showModelessDialog(url,window,"status:no")
Anyone got a solution for this?
regards
JT
|
|
|
|
|
ServicePack added some limitation to pupups and Modeless windows.
Some people use it in the past to fake addressbar, IE windows, etc.
Now you can't create windows which are too small, out of the visible region,
and of course with no statusbar!
See service pack 2 info for details.
- - - - - - - - - - - - - - - - - -
Memory leaks is the price we pay \0
01234567890123456789012345678901234
|
|
|
|
|
|
Hi!
I would like to align text in my button to the left. I use text-align:left, but it works only in IE and Opera. Mozilla keeps text centered. Is there any way how to fix it?
Thank you!
|
|
|
|
|
I really don't know why this happens, is it specified in the CSS or a bug in mozilla?
A quick & dirty solution is to set explicitly the button width and every aspect of the text size in the button. Then add a number of in the text of the button.
- - - - - - - - - - - - - - - - - -
Memory leaks is the price we pay \0
01234567890123456789012345678901234
|
|
|
|
|
I use CSS, otherwise browsers other than IE ignore control formatting.
Thanks, Nikos, I also thought about adding spaces to format text aligning, but it seems too awkward.
|
|
|
|
|
I always argue with my boss about this matter (guess who always wins
Is the difference just aesthetic or you can throw real arguments on the table. (for examble: a fixed width of a webpage is <750px which lives a blank if you work fullscreen at >=1024. A free width layout doesn't give you control to format your text and images and result to long text lines that are hard for the eye to follow)
Examples of free width are www.codeproject.com and sites with fixed width are www.cnn.com[^]
There are also sites who try to compine both, having the background/header/footer resized to the width of the browser and kipping the page content in a fixed border.
What you people think? What's the best and why? (Please also state if you are a web users or a web developer. )
- - - - - - - - - - - - - - - - - -
Memory leaks is the price we pay \0
01234567890123456789012345678901234
|
|
|
|
|
As a user and occasional developer, I much prefer the free form layout method. A fixed-size layout viewed on a screen larger than that targeted by the developer produces a display that is distracting and amateurish. It's true that you have less control over how the page is rendered using this method, but much of the layout can be preserved using CSS elements. A key step in developing such sites is testing the display using multiple browsers and screen resolutions, then optimizing the design to achieve the best possible appearance in most configurations.
"If it's Snowbird season, why can't we shoot them?" - Overheard in a bar in Bullhead City
|
|
|
|
|
We assume that the worst case is a 800x600 with the quickLaunck and the vertical Scrollbar visible, so a logical coice is a width of ~740.
Layouts that are not fixed or resize down to 740 are either targeting a special group of people or are just bad designs!
Lately we show some sites that were orignally designed to scale to somewhat 730-740, but since then they expanded -their businesses- by adding Google's TextAds to the right.
- - - - - - - - - - - - - - - - - -
Memory leaks is the price we pay \0
01234567890123456789012345678901234
|
|
|
|
|
we did too but now the new standard is getting to be 1024 wide which gives about 950px to play with
oh... and i always prefer fixed layout
"there is no spoon" biz stuff about me
|
|
|
|
|
l a u r e n wrote:
we did too but now the new standard is getting to be 1024 wide which gives about 950px to play with
oh... and i always prefer fixed layout
Thanx, for your answer.
I believe it's not time to drop the 800x600 yet,
last time i look there were about 15%-20% of total inet population.
- - - - - - - - - - - - - - - - - -
Memory leaks is the price we pay \0
01234567890123456789012345678901234
|
|
|
|
|
Fixed width looks as Roger said, amatuerish.
Here is the problem I have width fixed width...
Ask anyone and they'll likely say I hate having to scroll left and right...vertically isn't so bad especially if you have a mouse wheel....
If the developer used a larger resolution than 800x600 which probably half users have (check the w3c for more accurate) and width was fixed at 1024px and I browse the site at 800x600...Im stuck now having to scroll left and right to read text and make sure I haven't missed anything...
Whenever I see required HScrolling I cringe...
I'm a longtime developer and user...the way I see it is this:
I've been using GUI's since they came out...I consider myself an advanced computer user...I spend more time on a computer than most people. So I may not be an expert in usability...I don't believe there can be such a thing...I think the title is ridiculous. However i'm very lazy...if I can't find something pronto or something even slightly annoys me...I know it'll annoy someone not as savvy as me.
As for hscrolling...like I said it annoys me cuz I see it all the time...so if it remotely bothers me...it probably bothers average users...
How do I print my voice mail?
|
|
|
|
|
Hockey wrote:
Fixed width looks as Roger said, amatuerish.
Here is the problem I have width fixed width...
Ask anyone and they'll likely say I hate having to scroll left and right...vertically isn't so bad especially if you have a mouse wheel....
Geting a horizontal scrollbar at 800x600, has nothing to do with whether you use a fixed or non-fixed width to your layout. Please, switch to 800x600 and return to THIS page! See? Although Codeproject doesn't have a fixed width, the page doesn't scale below 800px and you get a horizontal scrollbar . Now go to cnn.com and see how they get it right (although they haven't predicted a quicklanch or an office toolbar )
A nicelly design page has to be fixed or resize down to somewhat ~740 pixels.
- - - - - - - - - - - - - - - - - -
Memory leaks is the price we pay \0
01234567890123456789012345678901234
|
|
|
|
|
It really depends on the content and type of site. Most of the time though, I pefer fixed width. That being said, I do not like sites over 800px width. I guess some people still browse with their window maximized, but not me. I always keep my browser window open at around 800px and of course have many windows open at a time.
For fixed sites though, it is best if they center in the window. That way if the browser is wider, it will still stay in your focus and not crammed over to the left.
Another aspect is the stretched content. As an example, when I was building www.HintsAndTips.com, I did not want the text of a tip to expand across a browser window into one line per paragraph. It is much easier to read if the text is shorter in width so that your eye does not lose its place when coming back to the next line.
I have seen a couple sites though that break their text up into dynamic columns which gives you the narrow text but still have free style layout, but this is only good for large texts.
About Fixed sites looking non-professional, I think: http://www.ZDNet.com[^] and http://www.GuiSoft.com[^] look professional and are fixed width.
Rocky <><
www.HintsAndTips.com - Now with RSS Feed
www.JokesTricksAndStuff.com
www.MyQuickPoll.com - Now with RSS Feed and Prizes
www.GotTheAnswerToSpam.com - Again
Me Blog
|
|
|
|
|
Thanks for your feedback.
I agree with you 100%
- - - - - - - - - - - - - - - - - -
Memory leaks is the price we pay \0
01234567890123456789012345678901234
|
|
|
|
|
Is there any programing standard used to measure and save the amount of time a user views a page? I am setting up a website with video conferencing through a webcam, and I couldn't find anything documented.
What I did was use PHP, MySQL, and Flash. I made a table called hoursused, with the fields userid, in, out, and id(which is set as the primary key).
When a user logs in, their user id is saved in a PHP session variable. When they go to the webcam page, a PHP script makes a new record in the Hoursused table, and updats the Userid field with their userid, the In field with the current date and time, and the id field, which updates using the auto_increment property. This script also saves the Id value in a session variable.
On the webcam page a flash object calls a PHP script every minute. It updates the Out field with the current date where the Id field equals the id value in the PHP session variable.
Comments, anyone?
|
|
|
|
|
|
Hey thanks for your help, but this looks like it won't log the time if a user exits out of the browser, or if their computer shuts off due to a power failure. It looks like it will post the variables to the database when the submit button is pressed.
What I did was make a JavaScript applet that calls a PHP script every minute. The PHP updates a single record with the current time.
On entrance to the webcam page, their TIME USED is automatically increase by one minute to prevent people from reloading the page every 59 seconds.
A PHP script makes sure the Javascript is loaded. If it is not loaded, the page displays an error.
I also added a safeguard to prevent people from reloading the page every 1:59 seconds (which will equal one minute).
A PHP script will flag a user who reloads the page more than three times. If this occurs, a customer representive can inspect the usage log, manually bill the customer for the time used, and also terminate the customer account.
Thanks for the help, though!
|
|
|
|
|
You can capture unload event like this:
<body onload='foo1()' onUnload="alert('Hi')">
|
|
|
|
|
Anonymous wrote:
You are kidding, aren't you? IMHO that msgbox is very, very annoying... bad example...
Never forget: "Stay kul and happy" (I.A.)
|
|
|
|
|
dnh wrote:
You are kidding, aren't you? IMHO that msgbox is very, very annoying... bad example...
Frankly speaking,I am serious about what I have written and am not kidding.
I seriously feel that solution is, what I have written.
If u think that I am wrong then Please Guide.
Ranjan Goyal
|
|
|
|
|
rgoyal wrote:
I seriously feel that solution is, what I have written.
Do we both mean that alert() ? Yes, trapping onunload is good idea... Bt displaying messagebox (that's what alert do, yes?) after user closes browser ... arrg Probably you only showed example of handling onunload and I only say it's bad example.
Did you mean something like <body onload="foo();" onunload="form.myform.submit();"> ?
You are not wrong, your solution is ok You must only delete that alert and swear that you'll never ever display messagebox after user closes browser window
do you agree?
David
Never forget: "Stay kul and happy" (I.A.)
|
|
|
|