1
gary711
how to make some javascript work in a custom block??
  • 2005/3/4 4:21

  • gary711

  • Just popping in

  • Posts: 13

  • Since: 2004/8/3 6


how to make the following javascript work in a custom block??

<script language="Javascript" type="text/javascript">

script>

<
body bgcolor='#ffffff' text='#000000' alink='#ff0000' vlink='#00007f' link='#0000ff' onLoad="type_text();">

<
table border="0" cellpadding="0" cellspacing="0" align="center" height="100%" width="100%">
<
tr><td align="center" valign="middle">
    <
h2>err ...... h2>
    
    <
form><textarea rows="3" cols="60" wrap="soft">textarea>form>

2
Mithrandir
Re: how to make some javascript work in a custom block??

Copy-paste into an HTML-type block?

3
rowdie
Re: how to make some javascript work in a custom block??
  • 2005/3/4 9:24

  • rowdie

  • Just can't stay away

  • Posts: 846

  • Since: 2004/7/21


First problem is the html 'body' tag, you've already got one in your theme, putting it in a block as well means there will be two body tags on your page.

Next, all your html tags are not closed... maybe you haven't posted the whole code?

I'm no javascript expert, but it looks like this code relies on there being only one form on your page... or that this form is the first one. Is that the case on the page you are trying to place this block?

I suggest you try including the javascript in your theme. Then you can use the theme's html body "onLoad" element.

4
carnuke
Re: how to make some javascript work in a custom block??
  • 2005/3/4 10:13

  • carnuke

  • Home away from home

  • Posts: 1955

  • Since: 2003/11/5


This script has some syntax errors. It won't even work on an ordinary html page. I suspect there is a further part that is missing?

5
gary711
Re: how to make some javascript work in a custom block??
  • 2005/3/4 10:56

  • gary711

  • Just popping in

  • Posts: 13

  • Since: 2004/8/3 6


the whole code
<html>
<
head>
<
script language="Javascript" type="text/javascript">

script>
head>

<
body bgcolor='#ffffff' text='#000000' alink='#ff0000' vlink='#00007f' link='#0000ff' onLoad="type_text();">

<
table border="0" cellpadding="0" cellspacing="0" align="center" height="100%" width="100%">
<
tr><td align="center" valign="middle">
    <
h2>err ...... h2>
    
    <
form><textarea rows="10" cols="60" wrap="soft">textarea>form>

    <
br /><br />
      <
a href="http://gary711.idv.st"> - gary711 a>td>tr>
table>

body>
html>


can you tell me how to including the javascript in my theme and use the theme's html body "onLoad" element

thanx for helping me

Login

Who's Online

284 user(s) are online (240 user(s) are browsing Support Forums)


Members: 0


Guests: 284


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits