Hi all,

1] I have to create one html file which uses javascript.
2] HTML page can be accessed by user and can fill the;
[A] Folder path along with file name
3] There will be a button, after click on that a batch file [already present but without any values] will run with new values provided by javascript.
4] Through that batch file i will process XML to HTML conversion.
5] After completion of batch 1 message should be given as "Process Over"

Purpose of this -
User will not interact directly with batch file. He/ She will just paste the path and file name and click on button.
Rest of the things will done in background.
User can see only output, without interrupting the actual process.

My HTML looks like below,

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Welcome to this project</title>
</head>
<body>
<h1 style="text-align:center;">Wel-come</h1>
<hr />
<table>
	<tr>
		<td>Please enter file name here</td>
		<td><input name="file_name" type="text" size="50" maxlength="50" id="fn1" /></td>
	</tr>
	<tr>
		<td>Please enter folder path here</td>
		<td><input name="folder_name" type="text" size="50" maxlength="20" id="fldn1"  /></td>
	</tr>
</table>
</body>
</html>

Please suggest is this possible? if yes how it can be done?
Any help will be appreciated as I am struggling this very much.

Cheers,
Mahesh :(

fh = fopen(getScriptPath(), 0); // Open the file for reading 
if(fh!=-1) // If the file has been successfully opened 
{ 
    length = flength(fh);         // Get the length of the file     
    str = fread(fh, length);     // Read in the entire file  so you can do your job from here
    fclose(fh);                    // Close the file 
     
// Display the contents of the file     
    write(str);     
}

Mlohokare,

Is the processing client-side (Javascript) or do you go server-side? Similarly, where is the source file; server-side or client-side?

If server-side is involved, then what are you running there: php, jsp, asp, cgi etc.?

It's not possible to answer your question witout knowing the basic architecture.

Airshow

Hi All,

Thanks for your instant replies.

Basically I am developing a small system which includes;
1] Saxon [for xml to html conversion]
2] XML files
3] XSLT files
4] Supporting files like css, common images etc.

This will be placed only once to end user machine.
So Client-Side methodology is involved here.

User can placed this as many machines they want with some basic limitations.

Here question is why i needed batch file creation in HTML [Javascript]?

Basically all will be done using batch file in Saxon. [File names are written in batch file and SAXON parser will take care of conversion.]

I want to create a GUI for user where he/ she will just place the file name and folder path in 2 different input box that value will be placed in batch file and when I click on process button on HTML page that batch file will run automatically [After completion of batch file processing automatically message will display that processing is over. {If possible only otherwise no message will dispaly}]

That is whole idea.

Is this possible??

Any further information required from me to solve this, i am always ready to share.

Cheers,
Mahesh :(

Mahesh,

Aha, I see.

You are into areas I have not been. My immediate thought is that trying to use the browser interface is a non-starter because browsers basically exist for client-server work and have inbuilt security constraints which limit their ability to interact with the client computer, though a good applet developer may well be able to tell you different.

I reckon that VB/VBA would be more appropriate for your front end than HTML/browser. Another approach would be simply to use the operating system's command line to run Saxon.

Maybe there's a Saxon support forum where you can search for a solution.

Hope this helps.

Airshow

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.