Re: [PHP] Javascript question

2009-03-02 Thread Michael A. Peters

Boyd, Todd M. wrote:

Before some of you newbies feel like being heroes and jump all over me:

I KNOW THIS IS A PHP-RELATED LIST. IF YOU DON'T LIKE MY QUESTION, DON'T
ANSWER IT.

Now that that's out of the way... I have a Javascript question (and
maybe a Browser/DOM question) for you folks. I'm not sure this is
anything they teach you in any online/in-seat/self-taught Javascript
course that I've ever seen before, so I figured I would bring it here.

My boss asked me if I knew of a tool that would change the  of
a page on-the-fly to test validation in different schemes (i.e., XHTML
Strict, Transitional, Loose, etc.).


The validators generally don't trigger javascript.

I use DOMDocument to create a valid xhtml page and then before sending 
it to the browser - if the browser does not report accepting valid xhtml 
(or I specify I want html) it filters the page to valid html 4.01.


That's probably what you want to do - code for valid xhtml and filter 
the output to other DTD's you want to make available server side rather 
than trying to use JS to alter the DOCTYPE.


Remember, the proper header to send also relies on the DOCTYPE so if you 
sent a header for xhtml but send html (or vice versa) you are still 
breaking the standard regardless of how pristine your output is.


Another advantage to building the document ahead of time and doing any 
translations server side is you can also filter the output for XSS in 
case you missed validating some input.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Javascript question

2009-03-02 Thread Boyd, Todd M.
> -Original Message-
> From: Michael A. Peters [mailto:mpet...@mac.com]
> Sent: Monday, March 02, 2009 4:42 PM
> To: Boyd, Todd M.
> Cc: PHP General list
> Subject: Re: [PHP] Javascript question
> 
> Boyd, Todd M. wrote:
> > Before some of you newbies feel like being heroes and jump all over
> me:
> >
> > I KNOW THIS IS A PHP-RELATED LIST. IF YOU DON'T LIKE MY QUESTION,
> DON'T
> > ANSWER IT.
> >
> > Now that that's out of the way... I have a Javascript question (and
> > maybe a Browser/DOM question) for you folks. I'm not sure this is
> > anything they teach you in any online/in-seat/self-taught Javascript
> > course that I've ever seen before, so I figured I would bring it
> here.
> >
> > My boss asked me if I knew of a tool that would change the

> of
> > a page on-the-fly to test validation in different schemes (i.e.,
> XHTML
> > Strict, Transitional, Loose, etc.).
> 
> The validators generally don't trigger javascript.
> 
> I use DOMDocument to create a valid xhtml page and then before sending
> it to the browser - if the browser does not report accepting valid
> xhtml
> (or I specify I want html) it filters the page to valid html 4.01.
> 
> That's probably what you want to do - code for valid xhtml and filter
> the output to other DTD's you want to make available server side
rather
> than trying to use JS to alter the DOCTYPE.
> 
> Remember, the proper header to send also relies on the DOCTYPE so if
> you
> sent a header for xhtml but send html (or vice versa) you are still
> breaking the standard regardless of how pristine your output is.
> 
> Another advantage to building the document ahead of time and doing any
> translations server side is you can also filter the output for XSS in
> case you missed validating some input.

I think you guys are missing the point--this is not for proprietary use
on our own server with our own pages. I wanted to write a bookmarklet
that would work for any page, on any server. I'm beginning to think
that's not necessarily possible (using just JS and the browser).

Thanks for all of your suggestions, anyway. :)


// Todd

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Javascript question

2009-03-02 Thread Boyd, Todd M.
> -Original Message-
> From: Robert Cummings [mailto:rob...@interjinn.com]
> Sent: Monday, March 02, 2009 4:18 PM
> To: Boyd, Todd M.
> Cc: PHP General list
> Subject: Re: [PHP] Javascript question
> 
> On Mon, 2009-03-02 at 16:11 -0600, Boyd, Todd M. wrote:
> > Before some of you newbies feel like being heroes and jump all over
> me:
> >
> > I KNOW THIS IS A PHP-RELATED LIST. IF YOU DON'T LIKE MY QUESTION,
> DON'T
> > ANSWER IT.
> >
> > Now that that's out of the way... I have a Javascript question (and
> > maybe a Browser/DOM question) for you folks. I'm not sure this is
> > anything they teach you in any online/in-seat/self-taught Javascript
> > course that I've ever seen before, so I figured I would bring it
> here.
> >
> > My boss asked me if I knew of a tool that would change the

> of
> > a page on-the-fly to test validation in different schemes (i.e.,
> XHTML
> > Strict, Transitional, Loose, etc.). After a bit of looking around,
> this
> > is the solution I came up with (as a bookmarklet):
> >
> > javascript:document.write(' 1.0
> > Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>' +
> > document.getElementsByTagName('html')[0].innerHTML);
> >
> > However, I'm not sure it will fire any validation events, since
> > technically the page has already been loaded (Javascript is just
> adding
> > more text). I fear the case will be the same if the current page's
> > source is sent to a new browser window.
> >
> > I'm not asking for any coding suggestions, necessarily--just curious
> as
> > to whether or not anyone knew if this will invoke browser validation
> > events or not. Comments and questions are more than welcome, though.
> :)
> 
> Can't you do it via PHP using a GET parameter? Seems more likely to
> work
> properly since it requires the page be reloaded on a fresh slate.
While
> at the same time, it will easily jump through the doctypes that the
> server deems suitable given the parameter
> 
> http://www.www.www/foo.php?doctype=xmlstrict1.0

Rob,

Absolutely. However, requiring a server-side script was something I was
hoping to avoid. It may be useful as an intranet utility somewhere down
the road, but a bookmarklet was what I was shooting for for this first
test.

Great minds think alike, eh? :)


// Todd

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Javascript question

2009-03-02 Thread Robert Cummings
On Mon, 2009-03-02 at 16:11 -0600, Boyd, Todd M. wrote:
> Before some of you newbies feel like being heroes and jump all over me:
> 
> I KNOW THIS IS A PHP-RELATED LIST. IF YOU DON'T LIKE MY QUESTION, DON'T
> ANSWER IT.
> 
> Now that that's out of the way... I have a Javascript question (and
> maybe a Browser/DOM question) for you folks. I'm not sure this is
> anything they teach you in any online/in-seat/self-taught Javascript
> course that I've ever seen before, so I figured I would bring it here.
> 
> My boss asked me if I knew of a tool that would change the  of
> a page on-the-fly to test validation in different schemes (i.e., XHTML
> Strict, Transitional, Loose, etc.). After a bit of looking around, this
> is the solution I came up with (as a bookmarklet):
> 
> javascript:document.write(' Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>' +
> document.getElementsByTagName('html')[0].innerHTML);
> 
> However, I'm not sure it will fire any validation events, since
> technically the page has already been loaded (Javascript is just adding
> more text). I fear the case will be the same if the current page's
> source is sent to a new browser window.
> 
> I'm not asking for any coding suggestions, necessarily--just curious as
> to whether or not anyone knew if this will invoke browser validation
> events or not. Comments and questions are more than welcome, though. :)

Can't you do it via PHP using a GET parameter? Seems more likely to work
properly since it requires the page be reloaded on a fresh slate. While
at the same time, it will easily jump through the doctypes that the
server deems suitable given the parameter

http://www.www.www/foo.php?doctype=xmlstrict1.0

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Javascript Question

2004-06-07 Thread Gabino Travassos
I would do two things.
1. Test your print() function on the same frame. Create a div called
"printableText" and see if you can print it. If that works, then your
print() function is okay.
2. Test your targeting. Use a different function, such as trying to change
the text or rollover an img in another frame. Then use the document.path
that worked.

BTW, I don't think "parent" is high enough.

And if anyone knows of a Javascript newsgroup this discussion should be on,
I would join it too.

- Original Message - 
From: "GodFoca" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 07, 2004 8:47 AM
Subject: [PHP] Javascript Question


> Hey! Sorry for the OT, but since there seems to be no js newsgroup in
gmane,
> I thought maybe someone in here could answer this simple question.
>
> I am trying to use javascript's "print()" to print a frame FROM ANOTHER
> frame.
>
> This is the layout:
>
> 
> 
> 
> 
>
> In printButton I have a simple anchor:
>
> 
>
> Yet nothing happens. What's wrong?
>
> Thanks in advance,
> Nicolas Sanguinetti
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] JavaScript question

2003-12-24 Thread -{ Rene Brehmer }-
you can simply call:

Window.location.href = 
'http://yourdomain.com/phpscripttocall.php?variable1=value1&variable2=value2'

^works in all browsers supporting JavaScript ... there's a few variants of 
this that will only work in IE or Netscape, but this one is vague enough to 
work in both... (not sure about Opera, it doesn't run well on my setup, so 
testing with it is a basically impossible for me)...

if you use frames, it's a bit more tricky, but I trust you don't, otherwise 
just ask ... :) ... I've got the complete JavaScript code to change the 
content of frames criss-cross of each other in any way and pattern you can 
dream off... (my site used to be a JS driven monster before I got my 
webhotel and the option to do it all with PHP) ...

Rene

At 19:58 02-11-2003, you wrote:
Good morning.

I know this may be off-topic but I don't know where to turn.

I'm building a dynamic web page system with PHP and need to figure out in
JavaScript how to do something. I have the timer figured out in JavaScript
but what I need is a way to automatically submit a request back to the web
server after the timer runs out. What I'm trying to do is display slides in
sequence. When the timer expires, it sends back to the web server the
parameters of slide group and the last slide displayed. The PHP on the
server end builds a new page and sends it to the browser with the next slide
in the sequence.
Any help would be greatly appreciated and my PHP skills are vastly above my
JavaScript skills (very basic beginner).
Robin 'Sparky' Kopetzky
Black Mesa Computers/Internet Service
Grants, NM 87020
--
Rene Brehmer
aka Metalbunny
http://metalbunny.net/
References, tools, and other useful stuff...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Javascript question

2003-11-20 Thread Brent Baisley
Funny off-off topic stuff. But to address the original question, which 
I deleted already, the problem is in your html, not your javascript.
The syntax for selects is:

Colorado

You had the "name" parameter in the option, not the select.

Now about unclogging drains...

On Nov 20, 2003, at 2:05 PM, Jason Wong wrote:

On Friday 21 November 2003 02:38, Robin Kopetzky wrote:
Ah-hah! Jason hides under an email address that does not exist so one
cannot reply directly to him, only via the list. Does that not 
describe the
person well?
My address only accepts mail directly from the list, cuts down on the 
spam
somewhat. I hope you wasn't trying to spam me :)

--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Javascript question

2003-11-20 Thread Aaron Gould
$strSinkTrap = fopen("/under/the/cabinet/", "w+");
while(!feof($strSinkTrap)){
unscrewFittings($pipe);
if($pipeUnscrewed == TRUE){
removeClog($hair, $grease, $grime);
}
}
fclose($strSinkTrap);
You may want to call the screwFittings function after removeClog has 
returned, or there's going to be an awful mess.

But then again, perhaps the automatic garbage collection will take care 
of that?

--
Aaron Gould
Parts Canada - Web Developer
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Javascript question

2003-11-20 Thread John Nichel
Jay Blanchard wrote:

[snip]
My kitchen sink always gets clogged when we clean out the fridge.  Does
anyone know of a way I can fix that? ;)
[/snip]
$strSinkTrap = fopen("/under/the/cabinet/", "w+");
while(!feof($strSinkTrap)){
unscrewFittings($pipe);
if($pipeUnscrewed == TRUE){
removeClog($hair, $grease, $grime);
}
}
fclose($strSinkTrap);
PHP rocks!

Of course, now we're offtopic, but it's funny.  That was great.

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Javascript question

2003-11-20 Thread Jay Blanchard
[snip]
My kitchen sink always gets clogged when we clean out the fridge.  Does
anyone know of a way I can fix that? ;)
[/snip]

$strSinkTrap = fopen("/under/the/cabinet/", "w+");
while(!feof($strSinkTrap)){
unscrewFittings($pipe);
if($pipeUnscrewed == TRUE){
removeClog($hair, $grease, $grime);
}
}
fclose($strSinkTrap);

PHP rocks!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Javascript question

2003-11-20 Thread John Nichel
Robin Kopetzky wrote:

> Ah-hah! Jason hides under an email address that does not exist so one cannot
> reply directly to him, only via the list. Does that not describe the person
> well?
> 

Jason's actions describe him, not his email address.  Jason is a valued
member of this list and has helped countless people with php problems.
This is a php list; asking a non-php question by mistake (not knowing
were the real problem lies, thinking it's a php issue, etc.) is one
thing, but you stated that your question was an offtopic JavaScript
question, so the responses you get should be expected.  There are
numerous list for JS.

-- 
By-Tor.com
It's all about the Rush
http://www.by-tor.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Javascript question

2003-11-20 Thread Jason Wong
On Friday 21 November 2003 02:38, Robin Kopetzky wrote:
> Ah-hah! Jason hides under an email address that does not exist so one
> cannot reply directly to him, only via the list. Does that not describe the
> person well?

My address only accepts mail directly from the list, cuts down on the spam 
somewhat. I hope you wasn't trying to spam me :)

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
You mean you didn't *know* she was off making lots of little phone companies?
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Javascript question

2003-11-20 Thread John Nichel
Jason Wong wrote:
> On Friday 21 November 2003 02:24, Robin Kopetzky wrote:
> 
>>I know this may be off-topic but I've got a problem that I do not know how
>>to work around...
> 
> 
> Hey list moderators, can this list be renamed the 
> php-general-javascript-and-the-kitchen-sink list?
> 

My kitchen sink always gets clogged when we clean out the fridge.  Does
anyone know of a way I can fix that? ;)

-- 
By-Tor.com
It's all about the Rush
http://www.by-tor.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Javascript question

2003-11-20 Thread Jay Blanchard
[snip]
Ah-hah! Jason hides under an email address that does not exist so one
cannot
reply directly to him, only via the list. Does that not describe the
person
well?
[/snip]

I found Jason's reply to be humorous! You yourselef said that your
request was off topic. What did you expect? Here is something you may
want to read

http://www.w3.org/TR/html4/interact/scripts.html#adef-onchange

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Javascript question

2003-11-20 Thread Mike Migurski
>Ah-hah! Jason hides under an email address that does not exist so one
>cannot reply directly to him, only via the list. Does that not describe
>the person well?

Insofar as he is cautious about spam, sure.

-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Javascript question

2003-11-20 Thread Robin Kopetzky
Ah-hah! Jason hides under an email address that does not exist so one cannot
reply directly to him, only via the list. Does that not describe the person
well?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Javascript question

2003-11-20 Thread Jason Wong
On Friday 21 November 2003 02:24, Robin Kopetzky wrote:
> I know this may be off-topic but I've got a problem that I do not know how
> to work around...

Hey list moderators, can this list be renamed the 
php-general-javascript-and-the-kitchen-sink list?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Mustgo, n.:
Any item of food that has been sitting in the refrigerator so
long it has become a science project.
-- Sniglets, "Rich Hall & Friends"
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] JavaScript question

2003-11-02 Thread Jake McHenry
> -Original Message-
> From: Marek Kilimajer [mailto:[EMAIL PROTECTED] 
> Sent: Sunday, November 02, 2003 2:03 PM
> To: Robin Kopetzky
> Cc: PHP General
> Subject: Re: [PHP] JavaScript question
> 
> 
> Would Refresh header work for you?
> 
> header('Refresh: 15; url=slides.php?page=2');
> 
> If you send this header the browser will navigate to 
> slides.php?page=2 
> after 15 seconds without user intervension.
> 
> Robin Kopetzky wrote:
> > Good morning.
> > 
> > I know this may be off-topic but I don't know where to turn.
> > 
> > I'm building a dynamic web page system with PHP and need to 
> figure out 
> > in JavaScript how to do something. I have the timer figured out in

> > JavaScript but what I need is a way to automatically submit 
> a request 
> > back to the web server after the timer runs out. What I'm 
> trying to do 
> > is display slides in sequence. When the timer expires, it 
> sends back 
> > to the web server the parameters of slide group and the last slide

> > displayed. The PHP on the server end builds a new page and 
> sends it to 
> > the browser with the next slide in the sequence.
> > 
> > Any help would be greatly appreciated and my PHP skills are vastly

> > above my JavaScript skills (very basic beginner).
> > 
> > Robin 'Sparky' Kopetzky
> > Black Mesa Computers/Internet Service
> > Grants, NM 87020
> > 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

Refresh wouldn't work in this example, he needs the form to auto
submit after the timer expires. What you would need to do is add this
to your javascript at the position when the timer expires:

document.formname.submit();

Of course replace formname with the name of your form.

I believe this is correct. I didn't test it.



Thanks,

Jake McHenry
Nittany Travel MIS Coordinator
http://www.nittanytravel.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] JavaScript question

2003-11-02 Thread Marek Kilimajer
Would Refresh header work for you?

header('Refresh: 15; url=slides.php?page=2');

If you send this header the browser will navigate to slides.php?page=2 
after 15 seconds without user intervension.

Robin Kopetzky wrote:
Good morning.

I know this may be off-topic but I don't know where to turn.

I'm building a dynamic web page system with PHP and need to figure out in
JavaScript how to do something. I have the timer figured out in JavaScript
but what I need is a way to automatically submit a request back to the web
server after the timer runs out. What I'm trying to do is display slides in
sequence. When the timer expires, it sends back to the web server the
parameters of slide group and the last slide displayed. The PHP on the
server end builds a new page and sends it to the browser with the next slide
in the sequence.
Any help would be greatly appreciated and my PHP skills are vastly above my
JavaScript skills (very basic beginner).
Robin 'Sparky' Kopetzky
Black Mesa Computers/Internet Service
Grants, NM 87020
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Javascript question...

2002-03-01 Thread Sven Jacobs

  
function openpopup(){
var popurl="url"
winpops=window.open(popurl,"Solution","width=500,height=400,")
}   
 //openpopup()


   

Kind Regards
Sven
-Original Message-
From: Philip Jeffs [mailto:[EMAIL PROTECTED]]
Sent: vendredi 1 mars 2002 12:41
To: PHP LIST
Subject: [PHP] Javascript question...


Hi,

I know this is a PHP list but i thought someone might be able to help me
out.

I was looking at the Levi's website the other day and i noticed a cool
script on there for opening pop-ups. They have managed to get rid of the
usual window borders altogether and it looks really good.

They have managed to do it by opening the pop-up window in full screen mode
and then making the window smaller and positioning it in a certain place on
screen.

I've figured out how to open it, shrink it and position it but for some
reason i the scroll bars are always there. The levi's site has no scroll
bars.

Does anyone know how to get rid of the scroll bars?

Thanks in advance,

Phil



Re: [PHP] Javascript question

2001-10-29 Thread Christian Cresante

   hello.  javascript has a toLowerCase() method. 
just call this method using onsubmit.

--- Rosen <[EMAIL PROTECTED]> wrote:
> Hi,
> This is not a PHP question, but can someone help me
> how to convert in lowercase the text into "INPUT"
> statment online ?
> (i.e. when the user press a key , the script
> automaticly to convert char in
> lowercase )
> 
> Thanks,
> Rosen
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> 


__
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Javascript question

2001-10-29 Thread Fatih Ustundag



-Original Message-
From: Rosen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 30, 2001 9:51 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Javascript question


Hi,
This is not a PHP question, but can someone help me
how to convert in lowercase the text into "INPUT" statment online ?
(i.e. when the user press a key , the script automaticly to convert char in
lowercase )

Thanks,
Rosen



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]