|
|||||||
| HTML Discussion and technical support for building, using and deploying HTML sites. |
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi Everyone,
I have been trying to fix this code so that it grabs the first image selected the front and side graphics and the text typed and renders it below as one graphic. <head > <title>E-Cover</title> <script type='text/javascript'> function a(){ var iframe = document.getElementById('image.jpg'); alert(iframe.contentWindow.document.body.innerHTML ); } </script><script> function temp(str){ var ifr=document.getElementById("itemplate"); if (str) ifr.src="templates/"+str; else ifr.src="notemplate.htm"; } function temp2(str){ var ifr=document.getElementById("itemplate2"); if (str) ifr.src="fronts/"+str; else ifr.src="none.jpg"; } function temp3(str){ var ifr=document.getElementById("itemplate3"); if (str) ifr.src="sides/"+str; else ifr.src="none.jpg"; } </script> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#3399FF"> <form action="ecover.php" method="post" id="" target="iecover" enctype="multipart/form-data"> <table height="100%" width="700" class="table10" align=center> <table width="490" align="center" cellpadding="2" cellspacing="2"> <tr align="center"> <td colspan="2" class=head1><b><font size="4" face="Georgia">Make your E-Cover</font></b></td> </tr> <tr> <td height=10 width=150><img src=#none height=1 width=150></td> <td ></td> </tr> <TR > <TD align=left width=100> <select size="18" name=template onchange="temp(this.value);"> <option selected value=''><--Choose a template--></option> <option value='ecover01.jpg'>ecover01</option> <option value='ecover13.jpg'>ecover13</option> <option value='ecover09.jpg'>ecover09</option> </select> </TD> <TD width="100%" align="left"><iframe src="notemplate.htm" id="itemplate" frameborder=0></iframe></TD> </TR> <tr> <td colspan="2" height=10 valign=center align=center class=padding0><img src=#none class=hr></td> </tr> <TR> <TD align=left valign="top" class=tp colspan="2"> <p align="center"><b><font color="#000080" size="5">Create a headline to put on your ecover. Select a headline text, font and colour. </font></b></p> <p align="center"><font color="#000080"><b> <span style="background-color: #FFFF00">NOTE</span>: For best quality we recommend creating an front cover image with your favorite graphic program, and insert your text in that graphic. Recommended sizes (in pixels) are: Front cover.. 350w x 400h Spine.. 100w x 400h</b></font></TD> </TR> <TR> <TD align=left valign="top" class=tp>Headline Text:</TD> <TD align="left"> <INPUT name=headline maxlength="35" size="25"> </TD> </TR> <TR > <TD align=left valign="top" class=tp>Headline Text Font:</TD> <TD align="left"> <select name=textformat> <option value='ARIAL_BOLD.TTF'>ARIAL_BOLD.TTF</option> <option value='TIMES_BOLD.TTF'>TIMES_BOLD.TTF</option> <option value='COURIER_BOLD.TTF'>COURIER_BOLD.TTF</option> </select> </TD> </TR> <!-- <TR> <TD align=left>Headline Text Color:</TD> <TD align="left"> <INPUT name=headlinecolor style="width: 150px;"> (e.g. #00FF3d ) </TD> </TR>--> <!-- <tr><td height=7></td></tr>--> <TR > <TD align=left valign="top" class=tp>Headline Text Colour:</TD> <TD align="left"> <select name=headlinecolor> <option value="0,0,0">Black</option> <option value="0,0,255">Blue</option> <option value="0,255,0">Green</option> </select> <br> <br> </TD> </TR> <TR > <TD align=left valign="top" class=tp colspan="2"> <p align="center"><b><font color="#000080" size="5">Create a headline to put on the spine. Select a headline text, font and colour. </font></b></p> <p align="center"><font color="#000080"><b> <span style="background-color: #FFFF00">NOTE</span>: Because of size limitations, some templates don't have a spine. </b></font></TD> </TR> <TR > <TD align=left valign="top" class=tp>Spine Text:</TD> <TD align="left"> <INPUT name=subheadline size="20"> </TD> </TR> <TR > <TD align=left valign="top" class=tp>Spine Text Font:</TD> <TD align="left"> <select name=subtextformat> <option value='ARIAL_BOLD.TTF'>ARIAL_BOLD.TTF</option> <option value='TIMES_BOLD.TTF'>TIMES_BOLD.TTF</option> <option value='COURIER_BOLD.TTF'>COURIER_BOLD.TTF</option> </select> </TD> </TR> <!-- <TR> <TD align=left>Sub Headline Text Color:</TD> <TD align="left" style="width: 150px;"> <INPUT name=subheadlinecolor> </TD> </TR>--> <!-- <tr><td height=7></td></tr>--> <TR > <TD align=left valign="top" class=tp>Spine Text Colour:</TD> <TD align="left"> <select name="subcolor"> <option value="0,0,0">Black</option> </select> <br> <br> </TD> </TR> <TR > <TD align=left valign="top" class=tp colspan="2"> <p align="center"><font size="4" color="#000080"><b>Select your pre-designed graphic to put as the front image on your cover, or use one of our graphics.</b></font></TD> </TR> <TR > <TD align=left valign="top" class=tp>Front Cover Image:</TD> <TD align="left"> <INPUT type=file name=frontcover size="20"> to upload your own<br> or <br> <table height="85" border="0" cellpadding="0" cellspacing="0" class=table0> <tr> <td align="left" style="padding: 0px;"> <select size="8" name=frontcover2 onchange="temp2(this.value);"> <option selected value=''><--Choose a front--></option> <option value='purpleguy.jpg'>purpleguy</option> </select> </td> <td> <img src="none.jpg" id="itemplate2" class=iframe2 frameborder=0> </td> </tr> </table> </TD> </TR> <TR > <TD align=left valign="top" class=tp colspan="2"> <p align="center"><font size="4" color="#000080"><b>Select your pre-designed graphic to put as the side image on your cover, or use one of our graphics.</b></font></TD> </TR> <TR > <TD align=left valign="top" class=tp>Spine Image:<br> (Optional)</TD> <TD align="left"> <INPUT type=file name=spine size="20"> to upload your own<br> or <br> <table class=table0 cellpadding="0" cellspacing="0"> <tr> <td style="padding:0px;"> <select size="8" name=spine2 onChange="temp3(this.value);"> <option selected value=''><--Choose a spine--></option> <option value='s_barcode_spine_red.jpg'>s_barcode_spine_red</option> <option value='s_barcode_spine_balck.jpg'>s_barcode_spine_balck</option> <option value='s_barcode_spine_orange.jpg'>s_barcode_spine_orange</option> </select> </td> <td> <img src=none.jpg id="itemplate3" class=iframe2 frameborder=0> </td> </tr> </table> </TD> </TR> <tr> <td colspan="2" height=10 valign=top align=center class=padding0><img src=#none class=hr></td> </tr> <tr> <td colspan="2" height=10></td> </tr> <tr align="right"> <td colspan="2"> <iframe id ='itemplate' src='ecover.php'></iframe> <button onclick='a()'>get</button> </td> </tr> </table> |
|
#2
|
||||
|
||||
|
Add the name attribute to the iframe, then reference
Code:
itemplate.location = "templates/"+str;
__________________
At least 98% of internet users' DNA is identical to that of chimpanzees |
|
#3
|
|||
|
|||
|
Hi
Hi Fang,
Ok I tried what you suggested but where it is supposed to render to ecover.php all it is doing is grabbing the page and not rendering the string what am I doing wrong? -Will |
|
#4
|
||||
|
||||
|
Your code picks an image and displays it in the iframe. What has ecover.php to do with this?
__________________
At least 98% of internet users' DNA is identical to that of chimpanzees |
|
#5
|
|||
|
|||
|
Hi,
I am just learning I thought that when calling the post you had to have a document to display the rendered image. <form action="ecover.php" method="post" id="form1" target="iecover"> Are you saying I don't need this reference I am sorry I am confused this is my first try I appreciate your help -Will |
|
#6
|
||||
|
||||
|
You can do it with a form an iframe or even add the image to the document.
__________________
At least 98% of internet users' DNA is identical to that of chimpanzees |
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|