Link to home
Start Free TrialLog in
Avatar of joymavs
joymavs

asked on

setfocus using php codes

hi,
hope you could help me this one:

in visual basic you can use setfocus by this code e.g text1.setfocus,   i just wanted to know what's the php version of this one?
and what is the php codes if you want message box will appear?

thanks....

Avatar of CosminB
CosminB

php for web or php-gtk?
if it's the first one you'll have to use javascript
if it's the second one you should use something like: $widget->grab_focus();
Avatar of joymavs

ASKER

hi cosminb,
i don't know much about java...
can you give me a sample of a javascript for setfocus..since it is php for web..

thanx....
ASKER CERTIFIED SOLUTION
Avatar of CosminB
CosminB

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of joymavs

ASKER

cosminb,

so there's no php code for setfocus?
and how to display the message box using php codes?

thanks...
no and what message box?
Avatar of joymavs

ASKER

ok thanks...

what i mean about the message box is:

e.g. if you want to delete an entry, it will not delete automatically, we want that a message box will appear stating that "Are you sure you want to delete the entry?"...do you know how?

thanks again....
try this:
<a href="some_url_for_delete" onclick="return confirm('are you sure?')">
Avatar of joymavs

ASKER

we want a message box like in visual basic.....

where it will pop up...

is there a php version of it?

thanks...
joymavs,

I don't think you're in the right place.  If you're talking about anything related to web developement, all these problems should be solved with Javascript, not PHP.  PHP is server side, what you are referring to is all on the browser (client) side.

Javascript allows you to accomplish features like setfocus and popup message boxes.  PHP doesn't deal with this.
(although technically, PHP can be used to dynamically generate the javascript code - which then accomplishes the features you are trying to accomplish).

Go to the Javascript section.

Avatar of joymavs

ASKER



thank you guys for your help......


joymavs