ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 21st, 2003, 03:33 PM
seamonkey seamonkey is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 18 seamonkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Asp Wysiwyg

I know that there are already a ton of these questions out there but I haven't been able to find the answer to mine... because I cant get my information into a database.

How exactly does this thing put the HTML into a database.....can someone please explain all parts of the process function and show a complete one. Is it possible that because I have my Iframe in a form that for some reason the Javascript isnt processing the information correctly and popping it into the hidden form field........please help I've been working on this for a week and a half.......

Sorry, this is my first experiance with Javascript......so this artical was a bit of a crash course for this ASPer



Thank you in advance

Reply With Quote
  #2  
Old March 22nd, 2003, 09:03 AM
an-ath an-ath is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 4 an-ath User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
The search feature is currently down, so I hope someone will kindly help me out. I'm having a problem with special characters when I display the post. Before I insert the post into the database I remove the special characters -
Quote:
sMessage = replace(replace(replace(replace(replace(replace _
(replace(replace(request.form("post_message"),"&","&"),_
"@","@"),"!","!"),"%","%"),_
";",";"),"<","<"),">",">" ),"'","'")

and when displaying the post i put them back in -
Quote:
sPostMsg = rsPosts("post_message")
response.write replace(replace(replace(replace _
(replace(replace(replace(replace _
(sPostMsg, "&","&"),_
"@","@"),"!","!"),"%","%"),";",";"),_
"<","<"),">",">" ),"'","'")

This works fine unless the poster has added additional spaces, in which case the output looks like this -
Quote:
&nbsp; some text the poster wrote

I tried to accomodate the spaces with <pre> tags, not a solution. I know the problem has to do with replacing the ampersand character before inserting, but i can't figure out how to replace the character and preserve the poster's spacing format.

As for the previous question, since the search is currently down... your javascript needs this function -
Code:
//OnSubmit, pass value from iframe to the DB
  function Process() { 
	// Assign the HTML code to a hidden form variable 
	var htmlCode = iView.document.body.innerHTML; 
	document.form2.post_message.value = htmlCode; 
	return true; 
	}

and your form tag needs this -

Code:
<form name="form2" id="form2" onSubmit="return Process()">[

in addition to the method and action attributes. When the search feature comes back up type in wysiwyg, this one is pretty easy to find.

Last edited by an-ath : March 25th, 2003 at 10:09 AM.

Reply With Quote
  #3  
Old March 22nd, 2003, 05:19 PM
seamonkey seamonkey is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 18 seamonkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thumbs up figured it out

I was keeping all of my Javascript behind the body tag not realizing that body Init()


so any way.....the lesson is makesure you define all of your javascript in the header.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > Asp Wysiwyg


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT