Welcome to the VanDyke Software Forums

Join the discussion today!

Go Back   VanDyke Software Forums > Scripting

Thread Tools Rate Thread Display Modes
Old 11-22-2019, 04:48 AM
gawe99 gawe99 is offline
Registered User
Join Date: Nov 2019
Posts: 1
trying to concat two variables and I am recieving the following error: ReferenceError

I am trying to concat two variables and I am recieving the following error: ReferenceError: str is not defined

I understand that I need to declare the var "var contents = str.concat(title,contentBody);" but I am unsure how best I do this.

Here is my function.

function printDiv() {
var title = $("#document-header").html();
var contentBody = $("#document-content").html();
var contents = str.concat(title,contentBody);
frame1[0].name = "frame1";
frame1.css({ "position": "absolute", "top": "-1000000px" });
var frameDoc = frame1[0].contentWindow ? frame1[0].contentWindow : frame1[0].contentDocument.document ? frame1[0].contentDocument.document : frame1[0].contentDocument;
//Create a new HTML document.
frameDoc.document.write('<html><head><title>Dev page</title>');
//Append the external CSS file.
frameDoc.document.write('<link href="/css/hmtheme.css" rel="stylesheet" type="text/css" />');
//Append the DIV contents.
setTimeout(function () {
}, 500);
Reply With Quote
Old 11-22-2019, 11:10 AM
bgagnon bgagnon is online now
VanDyke Technical Support
Join Date: Oct 2008
Posts: 4,544
Hi gawe99,

This particular scripting forum is specifically set up for discussion of scripting techniques that are applicable to VanDyke Software products.

Because your question is not VanDyke Software specific, you might consider posting the same question to a forum more generally focused on scripting.

VanDyke Software
Technical Support
(505) 332-5730
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -6. The time now is 10:11 AM.