Ask Question Forum:
Model Library:2025-02-08:A.I. model is online auto reply
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by duncanb7
at 2024-06-04 22:58:10
Point:500 Replies:6 POST_ID:828510USER_ID:11059
Topic:
JavaScript;;Hypertext Markup Language (HTML)
I get two frames in my start website page, main.html.
In First frame with src=inputbutton.html, is that the first input button(Home) to call back Home page which is
set to any website I want to go and second button(MyExcel) will go to open excel csv file(myexcel.csv) and
both button will go to display the content in the second frame, name="mainFrame" by
parent.mainFrame.document.location.href
The question is that after I display myexcel.csv file in second frame succesfully by click MyExcel button ,
I could NOT go back to the previous home.html page by click the Home button in the first frame. And I try to
replace the link href of my.excel.csv by www.yahoo.com
It will be able to go back to the home page by click HOME button. Why it can't go back with myexcel.csv?
Is it the problem related to the csv file display in IE7 will cause frame issue or problem ?
Please advise
Duncan
In First frame with src=inputbutton.html, is that the first input button(Home) to call back Home page which is
set to any website I want to go and second button(MyExcel) will go to open excel csv file(myexcel.csv) and
both button will go to display the content in the second frame, name="mainFrame" by
parent.mainFrame.document.location.href
The question is that after I display myexcel.csv file in second frame succesfully by click MyExcel button ,
I could NOT go back to the previous home.html page by click the Home button in the first frame. And I try to
replace the link href of my.excel.csv by www.yahoo.com
It will be able to go back to the home page by click HOME button. Why it can't go back with myexcel.csv?
Is it the problem related to the csv file display in IE7 will cause frame issue or problem ?
Please advise
Duncan
Frame page html code,main.html==========================<html><title >For testing only</title><frameset rows="45,*" cols="*"><frame id="myFrame" name="topFrame" frameborder="no" scrolling="NO" src="/inputbutton.html"><frame name="mainFrame" marginwidth=0 marginheight=0 src="http://www.mywebsite.com/home.html" frameborder="no" ></frameset></html>InputButton page html code,inputbutton.html============================================<html><script type="text/javascript">function myexcel(){parent.mainFrame.document.location.href="data/php/myexcel.csv?Load"+new Date().getTime();}function home(){parent.mainFrame.document.location.href="http://www.mywebsite.com/home.html?Load"+new Date().getTime();}</script><body><input type="button" value="Home" onclick="home();"/><input type="button" value="MyExcel" onclick="myexcel();"/></body></html> 1:2:3:4:5:6:7:8:9:10:11:12:13:14:15:16:17:18:19:20:21:22:23:24:
Author: duncanb7 replied at 2024-06-06 19:22:45
Anyway, thanks for your reply for trigger the final solution
Author: duncanb7 replied at 2024-06-06 19:22:15
Finally it is solved if I change as follows
From mainFrame.document changing into mainFrame.window
parent.mainFrame.window.location.href="http://www.mywebsite.com/home.html?Load"+new Date().getTime();}
From mainFrame.document changing into mainFrame.window
parent.mainFrame.window.location.href="http://www.mywebsite.com/home.html?Load"+new Date().getTime();}
Author: duncanb7 replied at 2024-06-06 19:01:34
Thanks for your reply, probably the link is working for parsing csv into html table.
But our user wants to display it in excel format so they can do some simple math calcuation
after download the csv completely
Probably, we should go back to the previous problem, why can't go back the previous page after
reading csv file. Probably, it is due to the file that is not html page and it is csv file.
Any other suggestion ?
But our user wants to display it in excel format so they can do some simple math calcuation
after download the csv completely
Probably, we should go back to the previous problem, why can't go back the previous page after
reading csv file. Probably, it is due to the file that is not html page and it is csv file.
Any other suggestion ?
Assisted Solution
Expert: Rob Jurd replied at 2024-06-06 17:49:39
250 points GOOD
my feeling is that you have activated the excel (office) plugin to display the excel file in the browser and once you've done that it won't let you change the href property.
would this be a better solution to load the csv file and bypass the plugin, given that some of your end users may not have it anyway?
http://purbayubudi.wordpress.com/2008/11/09/csv-parser-using-javascript/
would this be a better solution to load the csv file and bypass the plugin, given that some of your end users may not have it anyway?
http://purbayubudi.wordpress.com/2008/11/09/csv-parser-using-javascript/
Author: duncanb7 replied at 2024-06-06 05:19:41
it still not working even add it back <!DOCTYPE html><head>
<title></title></head>
Please advise, Could you try it at your side, you can create simple csv file in Excel
<title></title></head>
Please advise, Could you try it at your side, you can create simple csv file in Excel
Accepted Solution
Expert: Rob Jurd replied at 2024-06-05 18:19:04
250 points GOOD
with a little html & javascript fixes, i've got it to work for you
Frame page html code,main.html==========================<!DOCTYPE html><html><head><title>For testing only</title></head><frameset rows="45,*" cols="*"><frame id="myFrame" name="topFrame" frameborder="no" scrolling="no" src="inputbutton.html"><frame name="mainFrame" marginwidth=0 marginheight=0 src="http://www.mywebsite.com" frameborder="no" ></frameset></html>InputButton page html code,inputbutton.html============================================<!DOCTYPE html><html><head><title></title><script type="text/javascript">function myexcel() { parent.mainFrame.location.href="data/php/myexcel.csv?Load"+new Date().getTime();}function home() { parent.mainFrame.location.href="http://www.mywebsite.com/home.html?Load"+new Date().getTime();}</script></head><body><input type="button" value="Home" onclick="home();"/><input type="button" value="MyExcel" onclick="myexcel();"/></body></html> 1:2:3:4:5:6:7:8:9:10:11:12:13:14:15:16:17:18:19:20:21:22:23:24:25:26:27:28:29:30:31:32:33: