Layouts 4 Ning and more!
For those times when Skem9 goes down and we need a back-up plan....
Tags:
I am still searching for tutorials on how to upgrade to a same page preview for the Gens. I lost my notes from you when Skem9 went down. :(
When I add the preview to a div on the same page it screws up the gen style. How do I include it so that it's CSS doesn't break the Gen CSS?
Putting it in an iframe helped, but how to get the preview button to make changes in Iframe is next challenge.
http://blog.skemaholicsanonymous.com/BONGen/BONGen/bonGen.php
How are you doing it? Do you submit the form to the iframe, or what?
This is on the preview page for the IE issue:
<?if(strpos($_SERVER['HTTP_USER_AGENT'],'MSIE')!= false){?>
<form action="" method="post">
<textarea name="done" id="PrevCode" style="width:100%; height:500px; overflow: scroll; background:#999999; color:#000000; font-size: 14px; border:1px solid #0af;">
<? if(isset($_POST['done'])){echo str_replace('\\','',$_POST['done']);} ?>
</textarea>
<? if(isset($_POST['done'])){echo'<script type="text/javascript">DisplayPreview()</script>';}?>
<input type="submit" value="Click for Preview">
</form>
<? }
else{?>
<textarea id="PrevCode" style="width:100%; height:500px; overflow: scroll; background:#999999; color:#000000; font-size: 14px; border:1px solid #0af;">
<? if(isset($_POST['done'])){echo str_replace('\\','',$_POST['done']);} ?>
</textarea>
<input type="button" value="Click for Preview" onclick="javascript:DisplayPreview()">
<?}?>
<script type="text/javascript">DisplayPreview();</script>
</center>
This is on the form file:
<form action="http://blog.skemaholicsanonymous.com/BONGen/BONGen/bonGen.php#OhSnap" method="post">
Gen form stuff here
<input type="submit" value="Finished->" name="finished" />
<br>
<br>
<input type="reset" value="Reset Form" />
And this is on the bonGenfile:
<?
if(isset($finished)){
echo'<form action="http://blog.skemaholicsanonymous.com/Previews/BONGenEdit.php" onclick="this.target=\'my_iframe\';" method="post">
<textarea onclick="select()" name="done" id="code" onclick=\'this.replace("\n\n","");\'>';
include('bonStyle.css');
echo'</textarea>';
echo'<br /><input type="submit" value="Preview" name="subPreview" />
</form>';
}
?>
<script type="text/javascript">DisplayPreview();</script>
So yes, I am targeting the iframe.
Try putting that in the head portion of the previewer.
My stuff got filtered. balls.
This: http://pastebin.com/j5bbDYxs. Also, I just realized the generator adds the style tags, so you can take those out of the line in the pastebin link.
You freakin rock B.
http://blog.skemaholicsanonymous.com/BONGen/BONGen/bonGen.php
Still need to check other browsers... but pizza is calling me. BRB
Working well in IE & FF &Chrome!
Now I am going to try and add javascript tabs for the different areas. :)
Started by AnGella in Meeting Place. Last reply by Jon Blanco Oct 24.
Started by Zohra in Meeting Place Sep 26.
Started by AnGella in Announcements!. Last reply by AnGella Jun 3, 2023.
Started by AnGella in Announcements!. Last reply by ღCustom Creationsღ Test Page Apr 21, 2021.
Started by AnGella in Announcements!. Last reply by AnGella Aug 10, 2020.
© 2024 Created by AnGella. Powered by