|
Please read Chris Maunder's post above and then repost.
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
I think what you mean is:
You have a load function in a javascript file that runs when the page loads. You want to run this function again without reloading the page? (I am psychic )
You have to call the function..... either with an event handler on some element on the page or you can use setTimeout to run it after a certain amount of time.
|
|
|
|
|
Hi everyone!
I've got the following:
function setup_event(elem, eventType, handler)
{
(elem.attachEvent ? elem.attachEvent("on" + eventType, handler) : ((elem.addEventListener) ? elem.addEventListener(eventType, handler, false) : false));
}
function detach_event(elem, eventType, handler)
{
(elem.detachEvent ? elem.detachEvent("on" + eventType, handler) : ((elem.removeEventListener) ? elem.removeEventListener(eventType, handler, false) : false));
} This works perfectly in all browsers.
Trying to "shorten" things:
function setup_event(elem, eventType, handler)
{
(elem.addEventListener || elem.attachEvent)((elem.attachEvent ? "on" : "") + eventType, handler, false);
}
function detach_event(elem, eventType, handler)
{
(elem.removeEventListener || elem.detachEvent)((elem.detachEvent ? "on" : "") + eventType, handler, false);
} This works in MS IE; in Forefox & Opera it doesn't. Why?
-------------------------
Don't worry, be happy )
|
|
|
|
|
The zip file of this is at http://gpssharing.com/cookie.zip.
The test is at
http://gpssharing.com/cookie.php
Run the prog, then refresh the page, so the cookies will be read after being set.
can you see the two cookies 'fred' and 'test'?
Works fine on 4.4.6 under windows and 4.4.4 under Linux
Thanks in advance.
document.cookie = 'test=hello world; path=/';
_COOKIE Array<br />";
print_r($_COOKIE);
echo "_COOKIE['test'] " . $_COOKIE["test"] . "<br />";
echo "_REQUEST['test'] " . $_REQUEST["test"] . "<br />";
echo "_SERVER['HTTP_COOKIE'] " . $_SERVER["HTTP_COOKIE"] . "<br />";
echo "";
//phpinfo();
?>
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for - in order to get to the job you need to pay for the clothes and the car, and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
|
|
|
|
|
Mate that s trivial stuff... it will work.
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
Bradml wrote: it will work
Want to bet!!!!
I just had a reply from my ISP,
I am noticing that this is being blocked by suhosin which is a new security modules that we have installed to help prevent exploits and to keep the servers being blacklisted.
It looks like one thing has been fixed, breaking something else!
Hopefully other will 'learn' from this, at least my ISP did check out my test prog and admit to the problem, and have given me a solution.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for - in order to get to the job you need to pay for the clothes and the car, and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
|
|
|
|
|
Have you contacted Stephan Esser? If not please give me the details of what went wrong and I'll let him know.
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
No I have not, who is he?
I have slightly modified the zip file on my site, to display the version no of PHP
So if you know this guy please forward this info, here is the contents of the email from my ISP
I am noticing that this is being blocked by suhosin which is a new security modules that we have installed to help prevent exploits and to keep the servers being blacklisted.
When I disable suhosin I see
_COOKIE Array
Array
(
[fred] => home less
[test] => hello world
)
_COOKIE['test'] hello world
_REQUEST['test'] hello world
_SERVER['HTTP_COOKIE'] fred=home+less; test=hello world
It appears that it is blocking the document.cookie setting. I am not showing any errors so I am going to contact the author of suhosin to see if they have any suggestions.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for - in order to get to the job you need to pay for the clothes and the car, and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
|
|
|
|
|
please try this script, unfortunately I do not have access to a running PHP 4 server right now.
setcookie('fred', 'home less', null, '/', null, null, false); Stephan Esser is the man who found the PHP security response team and the Suhosin project.
Brad
Australian
- unknown PHP Developer on "Job Prospect"
Requirement: * Experience working with XML, XSL, XPath
Comment: and other things starting with X.
|
|
|
|
|
Bradml wrote: Stephan Esse
Thanks, Google just beat you, I am looking at the forums now.
Unfortunately I can't really use setcookie on my site, as with all software I could re write my code, but as the ISP is chasing this up.
They have just got back to me with a work around, I am impressed.
Thanks for your reply, as I am sure you will agree software updates are real fun;)
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for - in order to get to the job you need to pay for the clothes and the car, and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
|
|
|
|
|
What was the work around?
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
Bradml wrote: What was the work around?
From their email:-
We aren't willing to completely disable suhosin, but I have disabled the cookie encryption setting
It is very refreshing to have an ISP that actually looks into and 'fixes' problems
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for - in order to get to the job you need to pay for the clothes and the car, and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
|
|
|
|
|
That is quite nice of them, however that is a very useful function of Suhosin...
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
The ISP is surfspeedy.com perhaps the level 3 support were bored and fancied a play? But I can't complain.
My LINUX skills are rusty so I can't comment about Suhosin but their forums do seem active, and it seems there are 'issues' with it.
I get concerned when the last 2 release dates of a product were 2007.03.06 and 2007.03.04 generally I find if a product has so many releases, there is something wrong there. It may just be a group of happy hackers adding new bits or that they have not tested/designed the new features properly and have introduced bugs
I hasten to add I am in no way criticising Suhosin, I know absoulutely nothing about it.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for - in order to get to the job you need to pay for the clothes and the car, and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
|
|
|
|
|
The reason for so many releases is that PHP is constantly updated and therefore compatibility issues are encountered. Also they update it to protect against the latest PHP vulnerabilities.
Brad
Australian
- Captain See Sharp on "Religion"
any half intelligent person can come to the conclusion that pink unicorns do not exist.
|
|
|
|
|
|
What makes you think posting twice will make you get answers?
This is the kind of thing you should Google for.
Brad
Australian
- Me on "Public interest"
If you actually read this let me know.
|
|
|
|
|
Not to worry, anyway Google will have some examples of what you need.
Brad
Australian
- unknown PHP Developer on "Job Prospect"
Requirement: * Experience working with XML, XSL, XPath
Comment: and other things starting with X.
|
|
|
|
|
Don't cross post i thing some one has given answer to it in ASP forum you can delete this post
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
Hi all:
Is it possible that when I open a web page containing a checked checkbox it could be unchecked?
What I'm trying to accomplish is that I want to uncheck a checked checkbox, when the web page was opened. Specifically I want to uncheck the Yahoo toolbar install option when I open "http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash[^]"
I opened the web page using shellexecute(...).
Thanks
-- modified at 22:25 Thursday 22nd March, 2007
-- modified at 22:28 Thursday 22nd March, 2007
|
|
|
|
|
Please see my post below... and then please further define your question.
Brad
Australian
- Bradml on "MVP Status"
If this was posted in a programming board please rate my answer
|
|
|
|
|
Ok so are you trying to use a client application to uncheck a check box in a browser it opened?
Brad
Australian
- Me on "Public interest"
If you actually read this let me know.
|
|
|
|
|
Hi, You can do such "onload" you can call a function and in that function first you put a condition to check if the checkbox is checked than make it uncheck.
--------------------------------------------------------------------------------------------------
Hiral Shah
India
If you think that my answer is good enough and can be helpful for other then don't forget to vote.
|
|
|
|
|
These are some guidelines to get a good answer in this forum:
- Clearly state what you are trying to do, this means we will have a good background.
- State what exact language and platform you are using (eg. Operating System, Browser, Server Type....)
- Supply ALL error information you possibly can
- Supply all related code, but don't post your whole application.
- Mark where you suspect the problem to be, but include other code that may influence the problem.
- Surround code samples in "<pre> </pre>" tags as this makes it easier to read.
- Don't expect people to do the work for you, we are here to help you figure out solutions, not write them for you
- Use a descriptive subject, that way people who specialize in a certain area will read your post faster (eg "PHP socket problem", "IIS error message [404]")
- Finally use the right forum for the question, eg an ASP.net related problem will be answered a lot faster in the ASP.net forum
- And Last, Have fun
By following these guidelines you will find you have much better chance of receiving a quick and accurate solution to problems you are having.
Brad
Australian
- bryce on "Problems with Code Project"
*sigh* Maunder's been coding again...
|
|
|
|
|
i want to start process (like notepad) using java script
thank u.
|
|
|
|