Avatar billede gonzzo Nybegynder
13. november 1999 - 17:06 Der er 8 kommentarer og
1 løsning

hvordan er det nu lige med .......

Hejsa
i denne form er der en knap der hedder "generate HTML" ved siden af denne knap vil jeg gerne have en ny knap med teksten "send til dok" knappens funktion er at sende "resultatet af formen" til et bestemt dok. (eks. test.htm) kan det lade sig gøre vha. noget action=post eller andet ???

her er formen....


---------- cut --------

<HTML>
<HEAD>
    <TITLE>Medlem's Generator</TITLE>
    <SCRIPT language="JavaScript">
    <!--
        function generate(aForm)
        {
            window.parent.frames[1].document.close();
            window.parent.frames[1].document.open();
            window.parent.frames[1].document.close();
            window.parent.frames[1].document.writeln("<HTML>");
            window.parent.frames[1].document.writeln("<BODY BgColor=\"white\">");
            window.parent.frames[1].document.writeln('<CENTER><FONT Face=\"Arial\">Medlems Generator - HTML code for <B>'+document.gen.typpe.value+'</B></FONT></CENTER><BR>');
            window.parent.frames[1].document.writeln('<PRE>');
            window.parent.frames[1].document.writeln('&lt;!--------- Cut Below This Line ---------&gt;');
            window.parent.frames[1].document.writeln('&lt;tr ALIGN=&quot;Center&quot;&gt;');
            window.parent.frames[1].document.writeln('    &lt;td VALIGN=&quot;TOP&quot; BGCOLOR=&quot;Silver&quot;&gt;');
            window.parent.frames[1].document.writeln('        &lt;a NAME=&quot;'+document.gen.typpe.value.substring(0,1) +'&quot;&gt;&lt;/a&gt;');
            window.parent.frames[1].document.writeln('        &lt;font COLOR=&quot;Black&quot; SIZE=&quot;2&quot; FACE=&quot;Arial&quot;&gt;');
            window.parent.frames[1].document.writeln('            &lt;b&gt;'+document.gen.fornavn.value + '&lt;/b&gt;');
            window.parent.frames[1].document.writeln('        &lt;/font&gt;');
            window.parent.frames[1].document.writeln('    &lt;/td&gt;');
            window.parent.frames[1].document.writeln('    &lt;td VALIGN=&quot;top&quot; BGCOLOR=&quot;Silver&quot;&gt;');
            window.parent.frames[1].document.writeln('        &lt;font COLOR=&quot;Black&quot; SIZE=&quot;2&quot; FACE=&quot;Arial&quot;&gt;');
            window.parent.frames[1].document.writeln('            &lt;b&gt;'+document.gen.typpe.value + '&lt;/b&gt;');
            window.parent.frames[1].document.writeln('        &lt;/font&gt;');   
            window.parent.frames[1].document.writeln('    &lt;/td&gt;');
            window.parent.frames[1].document.writeln('    &lt;td VALIGN=&quot;top&quot; BGCOLOR=&quot;Silver&quot;&gt;');
            window.parent.frames[1].document.writeln('        &lt;font COLOR=&quot;Black&quot; SIZE=&quot;2&quot; FACE=&quot;Arial&quot;&gt;');
            window.parent.frames[1].document.writeln('            &lt;b&gt;'+ document.gen.eftnavn.value +'&lt;/b&gt;');
            window.parent.frames[1].document.writeln('        &lt;/font&gt;');
            window.parent.frames[1].document.writeln('    &lt;/td&gt;');
            window.parent.frames[1].document.writeln('    &lt;td VALIGN=&quot;top&quot; BGCOLOR=&quot;Silver&quot;&gt;');
            window.parent.frames[1].document.writeln('        &lt;font COLOR=&quot;Black&quot; SIZE=&quot;2&quot; FACE=&quot;Arial&quot;&gt;');
            window.parent.frames[1].document.writeln('            &lt;b&gt;'+document.gen.dato.value +'&lt;/b&gt;');
            window.parent.frames[1].document.writeln('        &lt;/font&gt;');
            window.parent.frames[1].document.writeln('    &lt;/td&gt;');
            window.parent.frames[1].document.writeln('    &lt;td VALIGN=&quot;top&quot; BGCOLOR=&quot;Silver&quot;&gt;');
            window.parent.frames[1].document.writeln('        &lt;font COLOR=&quot;Black&quot; SIZE=&quot;2&quot; FACE=&quot;Arial&quot;&gt;');
            window.parent.frames[1].document.writeln('            &lt;b&gt;'+document.gen.periode.value+'&lt;/b&gt;');
            window.parent.frames[1].document.writeln('        &lt;/font&gt;');
            window.parent.frames[1].document.writeln('    &lt;/td&gt;');
            window.parent.frames[1].document.writeln('&lt;/tr&gt;');
            window.parent.frames[1].document.writeln('&lt;tr ALIGN=&quot;Center&quot;&gt;');
            window.parent.frames[1].document.writeln('    &lt;td VALIGN=&quot;TOP&quot; BGCOLOR=&quot;Silver&quot;&gt;');
            window.parent.frames[1].document.writeln('        &lt;a NAME=&quot;'+document.gen.typpe.value.substring(0,1) +'&quot;&gt;&lt;/a&gt;');
            window.parent.frames[1].document.writeln('        &lt;font COLOR=&quot;Black&quot; SIZE=&quot;2&quot; FACE=&quot;Arial&quot;&gt;');
            window.parent.frames[1].document.writeln('            &lt;b&gt;'+document.gen.kr.value + '&lt;/b&gt;');
            window.parent.frames[1].document.writeln('        &lt;/font&gt;');
            window.parent.frames[1].document.writeln('    &lt;/td&gt;');
            window.parent.frames[1].document.writeln('&lt;tr ALIGN=&quot;Center&quot;&gt;');
            window.parent.frames[1].document.writeln('    &lt;td VALIGN=&quot;TOP&quot; BGCOLOR=&quot;Silver&quot;&gt;');
            window.parent.frames[1].document.writeln('        &lt;a NAME=&quot;'+document.gen.typpe.value.substring(0,1) +'&quot;&gt;&lt;/a&gt;');
            window.parent.frames[1].document.writeln('        &lt;font COLOR=&quot;Black&quot; SIZE=&quot;2&quot; FACE=&quot;Arial&quot;&gt;');
            window.parent.frames[1].document.writeln('            &lt;b&gt;'+document.gen.email.value + '&lt;/b&gt;');
            window.parent.frames[1].document.writeln('        &lt;/font&gt;');
            window.parent.frames[1].document.writeln('    &lt;/td&gt;');
            window.parent.frames[1].document.writeln('&lt;tr ALIGN=&quot;Center&quot;&gt;');
            window.parent.frames[1].document.writeln('    &lt;td VALIGN=&quot;TOP&quot; BGCOLOR=&quot;Silver&quot;&gt;');
            window.parent.frames[1].document.writeln('        &lt;a NAME=&quot;'+document.gen.typpe.value.substring(0,1) +'&quot;&gt;&lt;/a&gt;');
            window.parent.frames[1].document.writeln('        &lt;font COLOR=&quot;Black&quot; SIZE=&quot;2&quot; FACE=&quot;Arial&quot;&gt;');
            window.parent.frames[1].document.writeln('            &lt;b&gt;'+document.gen.innavn.value + '&lt;/b&gt;');
            window.parent.frames[1].document.writeln('        &lt;/font&gt;');
            window.parent.frames[1].document.writeln('    &lt;/td&gt;');
            window.parent.frames[1].document.writeln('&lt;tr ALIGN=&quot;Center&quot;&gt;');
            window.parent.frames[1].document.writeln('    &lt;td VALIGN=&quot;TOP&quot; BGCOLOR=&quot;Silver&quot;&gt;');
            window.parent.frames[1].document.writeln('        &lt;a NAME=&quot;'+document.gen.typpe.value.substring(0,1) +'&quot;&gt;&lt;/a&gt;');
            window.parent.frames[1].document.writeln('        &lt;font COLOR=&quot;Black&quot; SIZE=&quot;2&quot; FACE=&quot;Arial&quot;&gt;');
            window.parent.frames[1].document.writeln('            &lt;b&gt;'+document.gen.inpass.value + '&lt;/b&gt;');
            window.parent.frames[1].document.writeln('        &lt;/font&gt;');
            window.parent.frames[1].document.writeln('    &lt;/td&gt;');
            window.parent.frames[1].document.writeln('&lt;tr ALIGN=&quot;Center&quot;&gt;');
            window.parent.frames[1].document.writeln('    &lt;td VALIGN=&quot;TOP&quot; BGCOLOR=&quot;Silver&quot;&gt;');
            window.parent.frames[1].document.writeln('        &lt;a NAME=&quot;'+document.gen.typpe.value.substring(0,1) +'&quot;&gt;&lt;/a&gt;');
            window.parent.frames[1].document.writeln('        &lt;font COLOR=&quot;Black&quot; SIZE=&quot;2&quot; FACE=&quot;Arial&quot;&gt;');
            window.parent.frames[1].document.writeln('            &lt;b&gt;'+document.gen.bem.value + '&lt;/b&gt;');
            window.parent.frames[1].document.writeln('        &lt;/font&gt;');
            window.parent.frames[1].document.writeln('    &lt;/td&gt;');
            window.parent.frames[1].document.writeln('&lt;!--------- End Above This Line ---------&gt;');
            window.parent.frames[1].document.writeln('</PRE><CENTER>');
            window.parent.frames[1].document.writeln('<FONT face=\"Arial">This is how it will look like</FONT><BR>');
            window.parent.frames[1].document.writeln('<TABLE border=\"1\" width=\"100%\" bgcolor=\"#000000\">');
            window.parent.frames[1].document.writeln('<tr ALIGN=\"Center\">');
            window.parent.frames[1].document.writeln('    <td VALIGN=\"top\" BGCOLOR=\"Silver\">');
            window.parent.frames[1].document.writeln('        <a NAME=\"'+document.gen.typpe.value.substring(0,1) +'\"></a>');
            window.parent.frames[1].document.writeln('        <font COLOR=\"Black\" SIZE=\"2\" FACE=\"Arial\">');
            window.parent.frames[1].document.writeln('            <b>'+document.gen.dato.value + '</b>');
            window.parent.frames[1].document.writeln('            </font>');   
            window.parent.frames[1].document.writeln('    </td>');
            window.parent.frames[1].document.writeln('    <td VALIGN=\"TOP\" BGCOLOR=\"Silver\">');
            window.parent.frames[1].document.writeln('        <font COLOR=\"Black\" SIZE=\"2\" FACE=\"Arial\">');
            window.parent.frames[1].document.writeln('            <b>'+document.gen.typpe.value + '</b>');
            window.parent.frames[1].document.writeln('        </font>');
            window.parent.frames[1].document.writeln('    </td>');
            window.parent.frames[1].document.writeln('    <td VALIGN=\"top\" BGCOLOR=\"Silver\">');
            window.parent.frames[1].document.writeln('  <font COLOR=\"Black\" SIZE=\"2\" FACE=\"Arial\">');
            window.parent.frames[1].document.writeln('        <b>'+ document.gen.fornavn.value +'</b>');
            window.parent.frames[1].document.writeln('        </font>');
            window.parent.frames[1].document.writeln('    </td>');
            window.parent.frames[1].document.writeln('    <td VALIGN=\"top\" BGCOLOR=\"Silver\">');
            window.parent.frames[1].document.writeln('        <font COLOR=\"Black\" SIZE=\"2\" FACE=\"Arial\">');
            window.parent.frames[1].document.writeln('            <b>'+document.gen.eftnavn.value +'</b>');
            window.parent.frames[1].document.writeln('        </font>');
            window.parent.frames[1].document.writeln('    </td>');
            window.parent.frames[1].document.writeln('    <td VALIGN=\"top\" BGCOLOR=\"Silver\">');
            window.parent.frames[1].document.writeln('        <font COLOR=\"Black\" SIZE=\"2\" FACE=\"Arial\">');
            window.parent.frames[1].document.writeln('            <b>'+document.gen.email.value+'</b>');
            window.parent.frames[1].document.writeln('        </font>');
            window.parent.frames[1].document.writeln('        </td>');
            window.parent.frames[1].document.writeln('    <td VALIGN=\"TOP\" BGCOLOR=\"Silver\">');
            window.parent.frames[1].document.writeln('        <a NAME=\"'+document.gen.typpe.value.substring(0,1) +'\"></a>');
            window.parent.frames[1].document.writeln('        <font COLOR=\"Black\" SIZE=\"2\" FACE=\"Arial\">');
            window.parent.frames[1].document.writeln('            <b>'+document.gen.periode.value + '</b>');
            window.parent.frames[1].document.writeln('        </font>');
            window.parent.frames[1].document.writeln('    </td>');
            window.parent.frames[1].document.writeln('    <td VALIGN=\"TOP\" BGCOLOR=\"Silver\">');
            window.parent.frames[1].document.writeln('        <a NAME=\"'+document.gen.typpe.value.substring(0,1) +'\"></a>');
            window.parent.frames[1].document.writeln('        <font COLOR=\"Black\" SIZE=\"2\" FACE=\"Arial\">');
            window.parent.frames[1].document.writeln('            <b>'+document.gen.kr.value + '</b>');
            window.parent.frames[1].document.writeln('        </font>');
            window.parent.frames[1].document.writeln('    </td>');
            window.parent.frames[1].document.writeln('    <td VALIGN=\"TOP\" BGCOLOR=\"Silver\">');
            window.parent.frames[1].document.writeln('        <a NAME=\"'+document.gen.typpe.value.substring(0,1) +'\"></a>');
            window.parent.frames[1].document.writeln('        <font COLOR=\"Black\" SIZE=\"2\" FACE=\"Arial\">');
            window.parent.frames[1].document.writeln('            <b>'+document.gen.innavn.value + '</b>');
            window.parent.frames[1].document.writeln('        </font>');
            window.parent.frames[1].document.writeln('    </td>');
            window.parent.frames[1].document.writeln('    <td VALIGN=\"TOP\" BGCOLOR=\"Silver\">');
            window.parent.frames[1].document.writeln('        <a NAME=\"'+document.gen.typpe.value.substring(0,1) +'\"></a>');
            window.parent.frames[1].document.writeln('        <font COLOR=\"Black\" SIZE=\"2\" FACE=\"Arial\">');
            window.parent.frames[1].document.writeln('            <b>'+document.gen.inpass.value + '</b>');
            window.parent.frames[1].document.writeln('        </font>');
            window.parent.frames[1].document.writeln('    </td>');
            window.parent.frames[1].document.writeln('    <td VALIGN=\"TOP\" BGCOLOR=\"Silver\">');
            window.parent.frames[1].document.writeln('        <a NAME=\"'+document.gen.typpe.value.substring(0,1) +'\"></a>');
            window.parent.frames[1].document.writeln('        <font COLOR=\"Black\" SIZE=\"2\" FACE=\"Arial\">');
            window.parent.frames[1].document.writeln('            <b>'+document.gen.bem.value + '</b>');
            window.parent.frames[1].document.writeln('        </font>');
            window.parent.frames[1].document.writeln('    </td>');
            window.parent.frames[1].document.writeln('    </tr>');
            window.parent.frames[1].document.writeln('</TABLE></CENTER>');   
            window.parent.frames[1].document.writeln("<P></BODY>");
            window.parent.frames[1].document.writeln("</HTML>");
        }
    //-->
    </SCRIPT>
</HEAD>

<BODY bgcolor="WHITE">
<FORM name="gen">
    <CENTER>
        <TABLE Border="0" bgcolor="silver">
            <TR>
                <TD bgcolor="gray"><FONT Color="white">Typpe</FONT></TD>
                <TD bgcolor="gray"><INPUT Type="TEXT" Name="typpe" ></TD>
                <TD RowSpan="3" Valign="center" bgcolor="white">

                </TD>
            </TR>
            <TR>
                <TD bgcolor="gray"><FONT Color="white">For nvan</FONT></TD>
                <TD bgcolor="gray"><INPUT Type="TEXT" Name="fornavn" ></TD>
            </TR>
            <TR>
                <TD bgcolor="gray"><FONT Color="white">Efter navn</FONT></TD>
                <TD bgcolor="gray"><INPUT Type="TEXT" Name="eftnavn" ></TD>
            </TR>
            <TR>
                <TD bgcolor="gray"><FONT Color="white">Dato</FONT></TD>
                <TD bgcolor="gray"><INPUT Type="TEXT" Name="dato" ></TD>
                <TD BGColor="WHITE" align="center">Local Version</TD>
            </TR>
            <TR>           
                <TD bgcolor="gray"><FONT Color="white">Periode</FONT></TD>
                <TD bgcolor="gray"><INPUT Type="TEXT" Name="periode" ></TD>
            </tr>
            <TR>
                <TD bgcolor="gray"><FONT Color="white">Kr.</FONT></TD>
                <TD bgcolor="gray"><INPUT Type="TEXT" Name="kr" ></TD>
            </TR>
            <TR>
                <TD bgcolor="gray"><FONT Color="white">E-Mail adr.</FONT></TD>
                <TD bgcolor="gray"><INPUT Type="TEXT" Name="email" ></TD>
            </TR>
            <TR>
                <TD bgcolor="gray"><FONT Color="white">Login Navn</FONT></TD>
                <TD bgcolor="gray"><INPUT Type="TEXT" Name="innavn" ></TD>
            </TR>
            <TR>
                <TD bgcolor="gray"><FONT Color="white">Login Pass.</FONT></TD>
                <TD bgcolor="gray"><INPUT Type="TEXT" Name="inpass" ></TD>
            </TR>
            <TR>
                <TD bgcolor="gray"><FONT Color="white">Bemærkninger</FONT></TD>
                <TD bgcolor="gray"><INPUT Type="TEXT" Name="bem" ></TD>
                <TD bgcolor="gray">
                    <INPUT type="button" value="Generate HTML" onClick="generate(document.forms[0])">
                    <INPUT type="reset" value=" Clear " onclick="window.parent.frames[1].document.close();window.parent.frames[1].document.open();window.parent.frames[1].document.close();">
                    <INPUT type="button" value=" Exit " onClick="window.parent.history.back()">
                </TD>
            </TR>
        </TABLE>
    </CENTER><NOBR>
</FORM><NOBR>

</BODY>
</HTML>               
Avatar billede erikjacobsen Ekspert
13. november 1999 - 21:54 #1
Ahem, hvad er det nu dette har med Java at gøre ???

Men iøvrigt: hvad med du med: ...sende "resultatet af formen" til et bestemt dok... ??
Avatar billede gonzzo Nybegynder
13. november 1999 - 22:00 #2
prøv at indtaste oplysninger i denne form

http://www.intercode.dk/test/htmlgen.html
og klik på generate html det er så det resultat jeg gerne vil have sendt til et dok ved at klikke på en anden knap

og hvad det har med java at gøre ved jeg heller ikke, andet end sormen er lavet i java og tænkte så at der måske var en java funktion som kunne gøre det, men hvis der ikke er så lukker jeg det bare og opretter det i en anden gruppe !!
Avatar billede erikjacobsen Ekspert
13. november 1999 - 22:19 #3
Jeg forstår ingenting. Hvad er lavet i Java?

Og hvad mener du med: ...det resultat jeg gerne vil have sendt til et dok... ?

Hvad skal der ske?
Avatar billede gonzzo Nybegynder
13. november 1999 - 22:37 #4
det script som er en kopi af øverest på siden

har du overhovedet prøvet det link jeg postede??

hvis du har så får du et resultat som er lige til at "klistre" ind i et html dokument og det er så det om det kan sek automatisk uden at skulle til at åbne/indsætte/uploade på ny !!
Avatar billede erikjacobsen Ekspert
13. november 1999 - 22:43 #5
Det er ikke Java. Det er JavaScript.

Ja, jeg har prøvet linket.

Jeg får i nederste halvdel skrevet noget "rå" HTML. Mener du at
dette "rå" HTML skal blive en del af et andet HTML-dokument, og
vises til brugeren? Jamen, det er det jo næsten allerede, bortset fra
at det bliver vist "råt".

Det kan være vi "ses" igen i morgen... Det er jo lørdag aften :-)
Avatar billede gonzzo Nybegynder
13. november 1999 - 22:47 #6
hygge
Avatar billede gonzzo Nybegynder
14. november 1999 - 07:19 #7
og ja det er det jeg mener!!
det skal simpelt hen bare altid "puttes" ind øverst i en tabel som er oprettet i eks. dokumentet nyhed.html

er det mon muligt ?
Avatar billede erikjacobsen Ekspert
14. november 1999 - 08:16 #8
Jeg prøver lige at ryste hovedet en gang til.

Resultatet af ovenstående operation skal *gemmes* på
serveren til efterfølgende brug? Hvis det er tilfældet, kan
det *ikke* lade sig gøre uden brug af PHP, ASP, Perl, eller
noget andet CGI.

Hvis det bare skal vises for manden kan du blot fjerne linien
med <PRE>.
Avatar billede gonzzo Nybegynder
14. november 1999 - 14:12 #9
oay takker for svaret, prøver at oprette spm'et i php!!
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester