Forums

This topic is locked

form focus using PDEditor

Posted 16 Mar 2003 14:21:14
1
has voted
16 Mar 2003 14:21:14 Joe Glab posted:
I am using the PD HTML Editor and everything is fine except for the form focus. The cursor focuses on the editor when I load the page but I'd like the focus to be on a different field in my form. I put the proper javascript into my form but it's being overridden by the PD editor code somewhere. I tried to delete this code:

// Set the focus to the editor
function setFocus() {
textEdit.focus()
}

in pd_edit.html but it didn't seem to do anything.

Thanks.

Replies

Replied 18 Mar 2003 16:33:48
18 Mar 2003 16:33:48 Dennis van Galen replied:
try this:
<pre id=code><font face=courier size=2 id=code>
&lt;script language="JavaScript"&gt;
document.FORM_NAME.ELEMENT_NAME.focus();
&lt;/script&gt;
</font id=code></pre id=code>
HTH

with kind regards,

Dennis van Galen
DMXzone Manager
FAQ, Tutorial and Extension Manager


Studio MX / CFMX PRO / SQL 2000 / NT4 AND win2kPRO / IIS5
Replied 18 Mar 2003 17:13:43
18 Mar 2003 17:13:43 Joe Glab replied:
I'm using a DW template for this page. How can I add this code?

Replied 18 Mar 2003 18:02:48
18 Mar 2003 18:02:48 Dennis van Galen replied:
switch to codeview and paste it inside your &lt;form&gt; tags, that way you are sure it works.

with kind regards,

Dennis van Galen
DMXzone Manager
FAQ, Tutorial and Extension Manager


Studio MX / CFMX PRO / SQL 2000 / NT4 AND win2kPRO / IIS5
Replied 18 Mar 2003 23:29:28
18 Mar 2003 23:29:28 Joe Glab replied:
It's not working. The focus still goes to the PD Editor. It's got some kind of spell on my form! There is obviously code somewhere in the pd_edit,html file that I can't locate.

Replied 20 Mar 2003 09:38:11
20 Mar 2003 09:38:11 Dennis van Galen replied:
Open the page pd_edit.htm and edit this code, it's near the top:
<pre id=code><font face=courier size=2 id=code>
// Set the focus to the editor
function setFocus() {
textEdit.focus()
}
</font id=code></pre id=code>

you want to replace textEdit with your own formfield.

with kind regards,

Dennis van Galen
DMXzone Manager
FAQ, Tutorial and Extension Manager


Studio MX / CFMX PRO / SQL 2000 / NT4 AND win2kPRO / IIS5

Reply to this topic