Solved

How do I reference a sub-page of a Visio-generated Web page?

Posted on 2009-03-31
2
613 Views
Last Modified: 2012-05-06
I used the "Save as Web Page" feature in Visio Professional 2007 to publish my Visio document to a Web site. The Visio document included several sub-pages and I can navigate to these pages on the Web site by using the drop-down in the "Go to Page" section. But what I want to do is reference one of the posted sub-pages directly from another site. I can't figure out what the URL is for a sub-page. How can I link to a sub-page posted on the Web site?
0
Comment
Question by:kdenise1965
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 30

Accepted Solution

by:
Scott Helmers earned 500 total points
ID: 24038798
Visio doesn't let you do what you want to directly, but by modifying one line of the javascript code it creates you can -- and it works quite nicely!

One important thing to know first: when you save as web page, Visio creates a file I'll call the "index file" -- it's the pointer to the rest of the web page pieces. It has the same name as your Visio drawing with a .htm file extension. Visio also creates a subfolder that contains the rest of the web pieces -- html files, images, javascript files and more.

If your drawing is fred.vsd, then the index file is fred.htm and the subfolder is fred_files. By default, both are saved in the same directory as your Visio drawing.

To do what you want to do, open the index file in Notepad or a web page editor and look for this line:
   var g_CurPageIndex = 0;
replace it with the code shown below and save the file.

Now you can open any page by using a URL of the form
   http://<index page URL>?<page number>
For example, to load page 3 of fred.htm, use this
   http://fred.htm?3

Note that you'll need a full URL to point to your index page, not just the file name. On a web server it might look like
   http://www.mysite.com/fred.htm?3

var args = location.search.substr(1).split("?");
// show first page if called with no argument or if value of argument 
// is greater than the number of pages
if ( args < 1  || args > g_FileList.length )
   var g_CurPageIndex = 0;
else
   var g_CurPageIndex = args - 1;      // subtract 1; page list is zero relative

Open in new window

0
 

Author Closing Comment

by:kdenise1965
ID: 31565016
One more item to add to the solution...the sub-pages are referenced by number, not by the page name.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

David Parker’s latest book, Microsoft Visio 2010: Business Process Diagramming and Validation, will give you the tools to turn flowcharts and other business diagrams into valuable, data-driven corporate assets. Armed with the knowledge you’ll gain f…
The ability to add structure to Visio diagrams using containers, lists and callouts is one of my favorite features in Visio 2010. In this article I’ll describe a mashup of containers and lists that meet a real-world need. Prior to reading this ar…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

687 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question