SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    orange pips! orange pips!
    Join Date
    Oct 2001
    Location
    Its all about location
    Posts
    652
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Post WYSIWYG content management iframe issue

    I am attempting to create an online content management system for a website I am building. I have the following code below to create the interface to the system. My problem is that the code uses an IFRAME object where the user would type the text into. I have a situation where I would want to load text into that IFRAME object to view, but it would not be available in a file to reference in the src tag of the IFRAME element. Is there a way to get the data into the IFRAME to view and edit it? Here is the current code. Assume that all functions have been defined in a javascript insert.



    Code:
    <body onLoad="Init()">
    	<table id="tblCtrls" width="415px" height="30px" border="0" cellspacing="0" cellpadding="0" bgcolor="#D6D3CE">
    	<tr>
    		<td class="tdClass">
    			<img alt="Bold" class="butClass" src="bold.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doBold()">
    			<img alt="Italic" class="butClass" src="italic.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doItalic()">
    			<img alt="Underline" class="butClass" src="underline.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doUnderline()">
    
    			<img alt="Left" class="butClass" src="left.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doLeft()">
    			<img alt="Center" class="butClass" src="center.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doCenter()">
    			<img alt="Right" class="butClass" src="right.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doRight()">
    
    			<img alt="Ordered List" class="butClass" src="ordlist.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doOrdList()">
    			<img alt="Bulleted List" class="butClass" src="bullist.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doBulList()">
    
    			<img alt="Text Color" class="butClass" src="forecol.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doForeCol()">
    			<img alt="Background Color" class="butClass" src="bgcol.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doBackCol()">
    
    			<img alt="Hyperlink" class="butClass" src="link.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doLink()">
    			<img alt="Image" class="butClass" src="image.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doImage()">
    			<img alt="Horizontal Rule" class="butClass" src="rule.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doRule()">
    
    		</td>
    	</tr>
    	</table>
    	<iframe id="iView" style="width: 415px; height:205px"></iframe>
    
        <table width="415px" height="30px" border="0" cellspacing="0" cellpadding="0" bgcolor="#D6D3CE">
        <tr>
    		<td class="tdClass" colspan="1" width="80%">
    		  <select name="selFont" onChange="doFont(this.options[this.selectedIndex].value)">
    		    <option value="">-- Font --</option>
    		    <option value="Arial">Arial</option>
    		    <option value="Courier">Courier</option>
    		    <option value="Sans Serif">Sans Serif</option>
    		    <option value="Tahoma">Tahoma</option>
    		    <option value="Verdana">Verdana</option>
    		    <option value="Wingdings">Wingdings</option>
    		  </select>
    		  <select name="selSize" onChange="doSize(this.options[this.selectedIndex].value)">
    		    <option value="">-- Size --</option>
    		    <option value="1">Very Small</option>
    		    <option value="2">Small</option>
    		    <option value="3">Medium</option>
    		    <option value="4">Large</option>
    		    <option value="5">Larger</option>
    		    <option value="6">Very Large</option>
    		  </select>
    		  <select name="selHeading" onChange="doHead(this.options[this.selectedIndex].value)">
    		    <option value="">-- Heading --</option>
    		    <option value="Heading 1">H1</option>
    		    <option value="Heading 2">H2</option>
    		    <option value="Heading 3">H3</option>
    		    <option value="Heading 4">H4</option>
    		    <option value="Heading 5">H5</option>
    		    <option value="Heading 6">H6</option>
    		  </select>
    		</td>
        </tr>
        </table>
    </body>
    </html>

  2. #2
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you doing this for the heck of it? Or do you enjoy re-inventing the wheel?
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  3. #3
    SitePoint Guru DenverDave's Avatar
    Join Date
    Feb 2001
    Location
    Denver, Colorado
    Posts
    630
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've been looking at HTML Area also - great product. I would very much like to retain the line and indent formating for the code, which I have not been able to figure out. Any ideas.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •