CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Writing custom javascript

Print topic Send  topic

Author Message
drpcken

Posts: 60
Posted: 10/19/2004, 12:21 PM

I'm trying to write custom javascript in my pages for additional functionality, but all I get is errors when the page loads and runs the scripts.

My question is how difficult is it to get custom javascript to work correctly with codecharge?
View profile  Send private message
peterr


Posts: 5971
Posted: 10/19/2004, 12:42 PM

There is usually no difference in writing JavaScript with or without CodeCharge Studio. In most cases CodeCharge Studio shouldn't play any role here. Your JavaScript is preserved exactly as you entered it, and must work if it's correctly written.
You can even save your page after loading it into a Web browser, and then analyze the pure HTML with JavaScript and see why it doesn't work. You may even load it into FrontPage, DreamWeaver, or other editor and see why it doesn't work without CodeCharge Studio.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Martin Camp
Posted: 01/12/2005, 10:25 PM

peterr,

Im having a simular problem with my JavaScript, but what you are saying in your post defenatly do not aply !!
My custom javascipt gets all the spaces removed from the code - this hapens often and I have just been putting up with it
to get around this anoyance I place my javascript in my asp pages with comment around, and on each second or third upload of a page I need to replace the javascript that has had its spaces removed.

example.
<script language="JavaScript" type="text/javascript">
function OpenPop_UpList()
{
var FieldValue=escape(document.timesheet_item_edit.JobSuffixID.value);
var linkhref=document.getElementById("JobList").href;
var win=window.open(linkhref+"?s_FullList="+FieldValue,"JobList","left=100,top=10,width=480,height=480,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes");
win.focus();
}
</script>

after pasting this in my html page ( I have tryed at the top, at the bottom, and in custom code blocks, all do the same thing)
After a few uploads the javascript becomes something like this
some times it has random line breaks

<script language="JavaScript" type="text/javascript">
functionOpenPop_UpList(){varFieldValue=escape(document.timesheet_item_edit.JobSuffixID.value);varlinkhref=document.getElementById("JobList").href;varwin=window.open(linkhref+"?s_FullList="+FieldValue,"JobList","left=100,top=10,width=480,height=480,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes");
win.focus();
}
</script>

One other thing this page is an include page, it might make a diference?

Martin.
AaronE
Posted: 03/20/2005, 8:44 AM

I totally agree with Martin. There should be a tag in CodeCharge which says "Don't touch this code". It should keep the exact format that it was entered in.

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.