472,779 Members | 1,696 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,779 software developers and data experts.

Need advise on best method...

Hello all,

I am really really desperate on what I should do, and I am asking for help
from anyone in this newsgroup, here's the situation:

I am creating a form that is being run on a server where there is no scripts
allowed running (the software is from Opentext called Livelink)- therefore I
need javascript to do the tasks listed below:
1. validate the form - this has been completed
2. pop up another window that will go ahead and confirm the
selections/data - this has been completed.
3. Email the new form data to various users - Not done.
--> I have tried the MAILTO command in the script which I had working,
except there is some sort of line/character limitation that keeps causing
--> I have thought of calling a perl script from another server, but my
FORM is setup to execute the current server exectuable and the METHOD POST
is allocated to that script (livelink.exe) - is there a way to post for 2
different scripts so that I can run the livelink script and the one on the
remote node?
--> Thought of righting a script that will copy the information to the
clipboard and then to the email body.

--> confused, yeah me to...Basically my worst problem is to create and send
the email automatically (well at least pop up the email with all the data
entered). I have managed to setup the receiver list, Subject and a portion
of the body, but there is apparently to much in the body to work, and it
keeps erroring out.
--> I have also tried taking a script that will create a multi-line text
field in the second window, put the data in there, and copy it to a buffer -
but apparently my management thinks that this might be to much...Therefore I
thought if there is a way that the data from the fields can be copied to a
buffer and when the email window pops up automatcially pasted in that
window....I know confusing...

Anyway below is the code I have so far, hopefully you can get the jest of
what I am trying to accomplish - the main goal is to:
1. have user fill in form
2. 2nd window to pop up with quick summary in it and have user confirm data.
3. submit the data
4. have an email pop up with all the information added, subject,
receiptents, body (with no line/charater limitations).

For the line limitations I had thought that it was do to the fact the line
was to long, then I ran a partial script that put a new line in place after
80 characters.This still failed after - therefore I assume it might be a
mailto limitation...

Code - I have snipped out most of the code to ensure I am not breaking any
"corporate laws" :)
var FormIsGood="Yes";
var puHTML_1;
var puHTML_2;
var condition = new Array(100);
var loc_id = new Array(100);
var loc_name = new Array(100);
var conditionCounter;
var locationID;
var locationName;
var formName;
var saveAsName;
var newView;

// Reset variables to initial values
function resetValues(){

// Format a date to the prescribed format
function formatDate(year,month,day){
if (year < 0){year='0000'};
if (month < 0){month=0};
if (day < 0){day=0};
if(month < 10){dt=dt+"0"+(month)+"/"}else{dt=dt+(month)+"/"};
if(day < 10){dt=dt+"0"+day}else{dt=dt+day};
return dt;

// Set a date field to a desired date
function setToday(year_field,month_field,day_field,dt){

// Get and format the date and time now
function getNow(){
var dt=new Date();
// Javascript months start at 0 - not 1
if((dt.getMonth()+1) <
if(dt.getDate() <
if(dt.getHours() <
10){now=now+"0"+dt.getHours()+"."}else{now=now+dt. getHours()+"."};
if(dt.getMinutes() <
10){now=now+"0"+dt.getMinutes()+"."}else{now=now+d t.getMinutes()+"."};
if(dt.getSeconds() <
10){now=now+"0"+dt.getSeconds()}else{now=now+dt.ge tSeconds()};
return now;

// Check for required fields
function required(label, field){
if(field.value.length == 0){
window.alert(label+' is a required field. Please enter a value for

// Add conditions for setting the saved form folder location
function setLocation(text,id,nm){

// Create an HTML string
function addPopupHTML_1(t){

// Create an HTML string
function addPopupHTML_2(t){

// Set the default storage location
function setDefaultLocation(id,nm){

// Find and set the form storage location
function findLocation(text){
// Set defaults

// Check for a specific location
for (i=0; i<=conditionCounter; i++)

// Set a new form view upon submission
function setNewView(view){
if (view.length > 0){newView=view;};

// Implement the Livelink screen bypass
function openPopup(){
// Determine first save or edit save
s = document.myForm.LL_FUNC_VALUES.value;



// Submit the Livelink webform

// For the first save, calculate the form name and display the popup screen,
otherwise, don't
if (func!="Form.SaveForm")
// Define the code that is sent to the popup screen
// Define the statement to load the info to the Livelink screen
folder='opener.document.CreateForm.CTT_ID.value="' +locationID+'";opener.document.CreateForm.CTT_Path Saved.value="'+locationName+'";opener.document.Cre ateForm.CTT_Path.value="'+locationName+'"';

// If a new view has been defined, use it, otherwise use the view that was
used to create the form
if (newView.length >
0){folder=folder+';opener.document.CreateForm.LL_F ormView.value="'+newView+'"';}

// Define the HTML for the popup screen, starting with standard HTML
onblur="self.focus();"> ';
s=s+"<script> ";

//Begin Display summary script
s=s+' function display_summary(){';
s=s+' var t;';
s=s+' var d;';
s=s+' var label = new Array(100);';
s=s+' var data = new Array(100);';
s=s+' var fieldCounter = 0;';
s=s+' tab="\t";';
s=s+' cr="\n";';

s=s+' // Define the output values';
s=s+' function setField(fieldLabel, fieldData)';
s=s+' {';
s=s+' fieldCounter = fieldCounter + 1;';
s=s+' label[fieldCounter] = fieldLabel;';
s=s+' data[fieldCounter] = fieldData;';
s=s+' }';

s=s+'setField("Name:", "'+document.myForm._1_1_3_1.value+"

s=s+' //do not change anything in this section)*******************';
s=s+' var whole_data ="";';
s=s+' t="";';
s=s+' for (i=1; i<=fieldCounter; i++)';
s=s+' {';
s=s+' whole_data = whole_data + label[i] +cr+
"==========================" +cr+ data[i]+cr+cr;';
s=s+' }';

s=s+'document.summary.data_summary.value = whole_data;';

//End Display summary script

s=s+'function doSubmit(){opener.document.CreateForm.name.value =
document.temp.name.value;'+folder+';opener.doSubmi t(opener.document.CreateForm);window.close();}
s=s+'function reload(){window.location.reload( false );} ';

s=s+"</"+"script> ";
// Begin user-defined HTML

// Display the form name as HTML and keep the input field hidden
s=s+'<input type="hidden" name="name" value="'+formName+'"
size="90">'+formName+' ';


// End user-defined HTML
// Display the submit button
s=s+'<form name="temp"> ';
s=s+'<p align="center"><button onClick="doSubmit()">Submit
onClick="opener.history.go(-2);self.close()">Cancel</button></p> ';
s=s+'</body></html> ';
// Popup a screen
var att = 'menubar=yes,scrollbars=no,resizable=yes';
var pu = window.open('','pop',att);

// Write the code to the popup screen

// Refresh the popup screen to force the screen to stay on top of other
windows by activating the onBlur event
function definePopupHTML(){

//+++ Change the following addPopupHTML statements as needed.
addPopupHTML_1('<font size="2" face="Arial">This is a summary of what will
be submitted, please click on "O.K." to accept or "Cancel" to cancel this
submission <br>');
addPopupHTML_1('<font size="2" face="Arial"><b><u><br>File will be saved as:
addPopupHTML_2('<br><font size="2" face="Arial"><ul>');
addPopupHTML_2('<li>Submitters First Name:
addPopupHTML_2('<li>Submitters Last Name:


function setLocations(){

//+++ Update define the setDefaultLocation and setLocation statements as


// Specify various values
function setValues(){
// Specify the form field that determines the form storage location
// Use "Default" if there is only one possible location

//+++ Update the following statement with the form field or plain text that
specifies the location to save the form
findLocation(document.myForm._1_1_10_1_year.value+ document.myForm._1_1_2_1.value);

// Define the form name. This can be anything or any combination of fixed
text, field values, and dates.
// Use formatDate(year,month,day) function to return a formatted date
// Use the getNow() function to return the current date and time as
formatted text
// Use document.myForm._1_1_6_1.value (use an appropriate field
name/number) to use form field values in the form name

//+++ Update the formName equation to define the form name. You should
include the "Submitted-"+getNow()to ensure no duplicate form names are used.

//Document name is composed of:

// Define the default name of the file when a user wants to save the
data to their local hard drive.
//+++ Update the following statement


// Validate required fields. If all required fields are OK, then complete
the form submission.
function submitForm(){
// Do not change the following line
//+++ Update, add or remove the required() statements as necessary

//Start of Validation

//Ensure the FNAME & LNAME is filled in, even though it is automatic, just
//================================================== =============================
required("First Name", document.myForm._1_1_3_1 );
required("Last Name", document.myForm._1_1_4_1 );
// End of all the validation

// Do not change the following lines

if (FormIsGood=="Yes"){openPopup()};



<FORM TYPE="HIDDEN" NAME="myForm" ACTION="/livelink/livelink.exe"
ENCTYPE="multipart/form-data" METHOD="POST">


<INPUT TYPE="BUTTON" VALUE="Apply" NAME="IgnoreMe" ONCLICK="submitForm();">
Jul 23 '05 #1
2 2765
Mike Button wrote:
Hello all,
Please aim for useful subjects.
I am creating a form that is being run on a server where there is no
scripts allowed running (the software is from Opentext called Livelink)-
therefore I need javascript to do the tasks listed below: 1. validate the form - this has been completed
3. Email the new form data to various users - Not done. --> I have tried the MAILTO command in the script which I had working,
except there is some sort of line/character limitation that keeps causing
--> I have thought of calling a perl script from another server, but
FORM is setup to execute the current server exectuable and the METHOD POST
is allocated to that script (livelink.exe) - is there a way to post for 2
different scripts so that I can run the livelink script and the one on the
remote node?
Not reliably. Write one script that will do both functions. (Or, in a worst
case scenario, have one script do one function, then redirect to the other
script. I suspect this will force you to use the query string to pass data,
which could have nasty consequences)
--> Thought of righting a script that will copy the information to the
clipboard and then to the email body.

Forget it.

David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 23 '05 #2
JRS: In article <Ft********************@rogers.com>, dated Tue, 17 May
2005 00:13:22, seen in news:comp.lang.javascript, Mike Button
<mb*****@nortel.com> posted :
if((dt.getMonth()+1) <
if(dt.getDate() <

ISTM that you must be paid, by an incompetent management, per yard of

Those statements can be written as

now += LZ(dt.getMonth()+1) + "/"
now += LZ(dt.getDate()) + "-"

with a suitable function LZ defined - see via below. Not only do you
write getDate thrice, but you execute it twice - and it is of necessity
a comparatively slow function[*].

They can then be reasonably be combined ...

Your problem description was equally indigestible. Do not emulate
Pascal : <URL:http://www.merlyn.demon.co.uk/quotings.htm#Pascal>.

[*] Indeed, in the unlikely event that ECMA / W3 / whoever is reading
this, ISTM that javascript lacks a means of calling for the evaluation,
got a Date Object, of Y M D as Numbers using only one piece of
computation. Or a hint that it would be well to cache any that are
known of Y M D h m s within the Object, since it is common to call for 3
or 6 of them without changing the Object.

© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: serge calderara | last post by:
Dear all, I need to collect different type of data. Source of those data are CSV files and Access database. I am thinking on the way I should retrive those data under my VB.NET application in...
by: EasyRider41 | last post by:
I am trying to merge to scripting samples I for on a source code web site and having limited luck. Then first one is called Zebra Tables witch colors alternate rows of a table to look beter. The...
by: GTi | last post by:
What is the best method for doing this: Connection class containing: - Connection handle - Connection name - connection properties - disconnection of connection Group class containing: -...
by: Noel | last post by:
Hello, I'm currently developing a web service that retrieves data from an employee table. I would like to send and retrieve a custom employee class to/from the webservice. I have currently coded...
by: sonnystarks | last post by:
I am trying to learn HTML and have obtained several books on the subject. However, I am confused with the proper way of going about it as most of these books give me the basic tags and then say...
by: Carlos Villaseñor M. | last post by:
Hi every body: There are some years that I don´t to practice C++, but since 3 moths when I decide to take up again "C" I encounter that there are 2 versions of "C" (C++ and C#), the first time,...
by: Brian | last post by:
Hi All I have 2 question, the first one I hope I don't start an argurment ! How secure is MySQL? I have been asked by a client to create a windows based application that will control /...
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to...
by: | last post by:
Hi Database Gurus, Not to start a war among fanatics, but I just wanted to get honest opinion/advise of smart folks like you about this. We are about to begin development for a data intensive web...
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.