Hi all,
first post here, so please be gentle!
i have an app developed in c++ which uses a 3rd party activeX control to display SVG (graphics in XML format)
unfortunately, the activeX control is not very sophisticated and does not have all the methods i need - specifically it does not have the ability to generate an event based on clicking part of the SVG graphics. for example, in my app, i need to be able to click on a picture of a truck which then pops up a (C++) form window showing the contents of the truck, where it's going etc
SO....
I have embedded some javascript in the SVG xml in order to try and generate some events that i might be able to capture in c++
my cunning plan was
1. when user clicks a truck, javascript inserts a new XML element in the SVG (using insertafter.. to insert the truck ID at the end of the SVG.)
2. at same time, C++ generates a 'activeX window clicked' event
3. then read the new SVG from C++
However, step 3 does not work. It is only possible to read the original SVG in C++, not the modified SVG (not sure why - when i test in mozilla it works just fine)
This leaves me with the question :
- how can i use javascript to 'pass' the truck ID number to C++
The obvious solution is to write the truck ID to a file-> (If I could write the file on clicking the SVG element, i could process with steps 2,3 above with step 3 opening the new file)
however, I recall for obvious security reasons that javascript is not allowed to write to the harddrive.
Is there any other solution to this?
Note: this is all local processing - no internet, intranet etc.
first post here, so please be gentle!
i have an app developed in c++ which uses a 3rd party activeX control to display SVG (graphics in XML format)
unfortunately, the activeX control is not very sophisticated and does not have all the methods i need - specifically it does not have the ability to generate an event based on clicking part of the SVG graphics. for example, in my app, i need to be able to click on a picture of a truck which then pops up a (C++) form window showing the contents of the truck, where it's going etc
SO....
I have embedded some javascript in the SVG xml in order to try and generate some events that i might be able to capture in c++
my cunning plan was
1. when user clicks a truck, javascript inserts a new XML element in the SVG (using insertafter.. to insert the truck ID at the end of the SVG.)
2. at same time, C++ generates a 'activeX window clicked' event
3. then read the new SVG from C++
However, step 3 does not work. It is only possible to read the original SVG in C++, not the modified SVG (not sure why - when i test in mozilla it works just fine)
This leaves me with the question :
- how can i use javascript to 'pass' the truck ID number to C++
The obvious solution is to write the truck ID to a file-> (If I could write the file on clicking the SVG element, i could process with steps 2,3 above with step 3 opening the new file)
however, I recall for obvious security reasons that javascript is not allowed to write to the harddrive.
Is there any other solution to this?
Note: this is all local processing - no internet, intranet etc.