This topic is locked

Javascript not work

1/17/2010 2:46:52 AM
PHPRunner General questions
D
doykoes author

Hi, i'm lost for hours searching placing javascript, and it's not works for me :
Here my script in visual editor
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML {$html_attrs}><HEAD><TITLE>Pesan Mobil</TITLE>
//..phprunner script here....(this text not include in visual editor)
{END body}</BODY></HTML>
// and Java script at the end of page..(this text not include in visual editor)
<script type="text/javascript">

<script>

document.forms.editform.tpjam.disabled=false;

</script>
Can somebody help me, whats wrong...?

Thank You

G
gchable 1/18/2010

Prueba esto:

document.forms.editform.value_tpjam.disabled=false;
D
doykoes author 1/18/2010



Prueba esto:

document.forms.editform.value_tpjam.disabled=false;



<script type=text/javascript> ---> is this line syntax correct...?

<script>

document.forms.editform.value_tpjam.disabled=true;

</script>
{END body}</BODY></HTML> --> end of PHPrunner script
and..still not working....

D
danaci 1/19/2010

<script type="text/javascript">

function init(){

document.forms.editform.value_Field1.disabled = true;

document.forms.editform.value_Field2.disabled = true;

}

</SCRIPT>

</HEAD>
<BODY onload=init()>

...

...

</BODY>

D
doykoes author 1/19/2010



<script type="text/javascript">

function init(){

document.forms.editform.value_Field1.disabled = true;

document.forms.editform.value_Field2.disabled = true;

}

</SCRIPT>

</HEAD>
<BODY onload=init()>

...

...

</BODY>



Thank you, but still not working for me

here syntax sample :
.....PHPR script

<META content="MSHTML 6.00.2900.5512" name=GENERATOR>
<script type="text/javascript">

function init(){

document.forms.editform.value_tpjam.disabled = true;

document.forms.editform.value_tpharian.disabled = true;

}

</SCRIPT>
</HEAD>

<BODY onload = init()>{BEGIN body}{$header}
<TABLE id="center_block{$id}" align=center>

<TBODY>

.....PHPR script

J
Jane 1/19/2010

Hi,
you can add your code at the end of the page, I.e.

</HTML>

<script>

document.forms.editform.value_tpjam.disabled = true;

document.forms.editform.value_tpharian.disabled = true;

</script>
D
doykoes author 1/19/2010



Hi,
you can add your code at the end of the page, I.e.

</HTML>

<script>

document.forms.editform.value_tpjam.disabled = true;

document.forms.editform.value_tpharian.disabled = true;

</script>



Thank you, but Still not working....?

J
Jane 1/20/2010

It's difficult to tell you what's happening without seeing actual files.
Please publish your project on Demo Account and open a ticket at http://support.xlinesoft.com sending a URL to your pages along with instructions on reproducing this error.

E
electromotive 2/11/2010

I have found that in PHPR 5.2, custom javascript has changed a bit. The above snippet works ok in PHPR 5.1, but in 5.2 the field/object names have changed.
So in 5.2 the new object/field names are of the following form:
</HTML>

<script>

document.forms.editform1.value_Fieldname_1.focus(); // or whatever property you are messing with

</script>
Note the new suffixes. PHPR relocates the script automatically inside the body (as before)
If you are using 5.2 try this:

document.forms.editform1.value_tpjam_1.disabled = true;
It helps me to use Firefox with Firebug to help debug javascript by looking into the DOM.