javascript & php problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

it's possible, yes. However, not like you tried, obviously. Depending on what you want to be done, the location object can be used to set the current document. Could also just let it submit to a page, the location used can be changed dynamically via the form object's action property.

Personally, I'd avoid Javascript as much as possible.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

I wouldn't say that but I'd certainly only use it where it makes sense.

Given that javascript can be disabled or unsupported it doesn't make sense to do things with it that can be done another.

Most of the javascript I do is just for pre-server form validation (just for extra measure and to reduce the number of server requests), as is with most... and of course rollovers, which don't matter a great deal if unsupported.

Although it can be pretty fun to play around with the DOM stuff and DHTML at times... The main thing is to always remember it won't be supported by everybody's browsers!! :roll:
Post Reply