/    Sign up×
Community /Pin to ProfileBookmark

sum js button target probs

ok….dis is what i gots so far for an html to visual text comverter(ignore tha ~’s):

~

<HTML>
<HEAD>
<TITLE>View It! Editor v. 1.0.2</TITLE>
<script language=”JavaScript1.2″><!–
if (document.getElementById)
document.write(‘<STYLE TYPE=”text/css”>n#SUB {font-family:arial;font-size:10px;background-color:black;font-weight:bold;color:orange;border-width:0;border:solid;border-color:#000000;}n#TXT {background-color:white;color:black;font-family:ocra extended;}n</STYLE>’);
//–>
</script>
</HEAD>
<BODY background=”000000″ leftmargin=”0″ topmargin=”0″ marginwidth=”0″ marginheight=”0″>
<center>
<script language=”Javascript”>

<!–

var x = 0;
var s = ‘/’;

function display() {

srce = open(“”, “displayWindow”, “toolbar=no,scrollbars=yes,status=yes”, “width=100%, height=100%”);

srce.document.open();

srce.document.write(document.html.code.value);

srce.document.close();
}

//–>

</script>
<p align=center border=0>
<br>
<fieldset align=”center” style=”width:50%;height:50%;text-align:center”>
<legend style=”width:auto;height:auto;color:orange;text-align:center;font-family:arial;font-size:9pt;”>View It! Editor v. 1.0.2</legend>
<center>
<form name=”html” target=”dsp”>
<textarea name=”code” id=”TXT” ROWS=15 COLS=42 wrap=”virtual” onfocus=”if(x++ == 0) this.value=”;” align=”center”></textarea> &nbsp;
<br>
&nbsp; <input type=”button” id=”SUB” onclick=”display()” value=”View It!”>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=”reset” id=”SUB” value=”Reset”>
</form></center>
</fieldset>
</p>
</center>
</BODY>
</HTML>

~

howeva…….dis code creates a popup output area…….
and i need ta target da input to tha frame named “dsp”.
i believe you change the target preferences here:

~

srce = open(“”, “displayWindow”, “toolbar=no,scrollbars=yes,status=yes”, “width=100%, height=100%”);

srce.document.open();

srce.document.write(document.html.code.value);

srce.document.close();

~

howeva, i may be wrong. if ya can, pleaz help me out.

thanx

XaTaKu_NaKuSuTe

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@freefallJul 10.2003 — if you reply, feel free to not spell phonetically

<i>
</i>&lt;HTML&gt;
&lt;HEAD&gt;
&lt;TITLE&gt;View It! Editor v. 1.0.2&lt;/TITLE&gt;
&lt;script language="JavaScript1.2"&gt;&lt;!--
if (document.getElementById)
document.write('&lt;STYLE TYPE="text/css"&gt;n#SUB {font-family:arial;font-size:10px;background-color:black;font-weight:bold;color:orange;border-width:0;border:solid;border-color:#000000;}n#TXT {background-color:white;color:black;font-family:ocra extended;}n&lt;/STYLE&gt;');
//--&gt;
&lt;/script&gt;
&lt;/HEAD&gt;
&lt;BODY background="000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"&gt;
&lt;center&gt;
&lt;script language="Javascript"&gt;

&lt;!--

var x = 0;
var s = '/';

function display() {
window.dsp.document.open();
window.dsp.document.write(document.html.code.value);
window.dsp.document.close();
}

//--&gt;


&lt;/script&gt;
&lt;p align=center border=0&gt;
&lt;br&gt;
&lt;fieldset align="center" style="width:50%;height:50%;text-align:center"&gt;
&lt;legend style="width:auto;height:auto;color:orange;text-align:center;font-family:arial;font-size:9pt;"&gt;View It! Editor v. 1.0.2&lt;/legend&gt;
&lt;center&gt;
&lt;form name="html" target="dsp"&gt;
&lt;textarea name="code" id="TXT" ROWS=15 COLS=42 wrap="virtual" onfocus="if(x++ == 0) this.value='';" align="center"&gt;&lt;/textarea&gt;
&lt;br&gt;
&lt;input type="button" id="SUB" onclick="display()" value="View It!"&gt;
&lt;input type="reset" id="SUB" value="Reset"&gt;
&lt;/form&gt;&lt;/center&gt;
&lt;/fieldset&gt;
&lt;/p&gt;
&lt;iframe name="dsp" width=300 height=200&gt;&lt;/iframe&gt;
&lt;/center&gt;
&lt;/BODY&gt;
&lt;/HTML&gt;


Also you might think it's cool, to make it "real-time," so as soon as you code, it goes into the frame, try replacing the original textarea with this. I'm easily pleased this late in the night (watching as tags disappear when > is added, ooh aah)
<i>
</i>&lt;textarea name="code" id="TXT" ROWS=15 COLS=42 wrap="virtual" onfocus="if(x++ == 0) this.value='';" align="center" onkeyup="display()"&gt;&lt;/textarea&gt;


  • - Ian
  • Copy linkTweet thisAlerts:
    @xataku_nakusuteauthorJul 10.2003 — yet again, you have came through to my aid.....and ill try to get my language problems fixed, hehe

    thank you

    ..:: XaTaKu_NaKuSuTe ::..
    ×

    Success!

    Help @xataku_nakusute spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 6.16,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @nearjob,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,
    )...