# Saving Java embedded web page



## aalishan (Mar 9, 2011)

Hello,

I have to print my cell phone call records but unfortunately my wireless provider displays the number I called only when mouse is hovered over Call details. I have 470 call records and copy pasting all those numbers when mouse is hovered over it will be one hell of a task.

Is there any way I could save all the information related to Called Number and do not have to move my mouse for each and every number?

Using my basic programming understanding  (Though I know nothing about java), they are using some mouseover function that displays this information. The possibility of this information to be on the server is less because this information is even available when I switch off my wireless.

I can paste that portion of the code if someone needs it to help me out.

Cheers,
Aalishan


----------



## Ninjaboi (Dec 27, 2010)

Hello aalishan, welcome to TSF.

So your wanting to print out records from your phone right? We'll, first can I ask if your able to print anything out from your phone? Have you set this up already, just unsure of how to get the records to print?

What type of phone do you have? Some are not capable of wireless printing, which in case might require a cable or possibly rigging to achieve.


----------



## aalishan (Mar 9, 2011)

Hi Ninjaboi,

Thanks.

These records do not have to be printed from a phone but a website. My cell phone service provider (chatrwireless.com) has a website that uses some java code and displays call detail information only when mouse is moved over a particular hyperlink.

Now my problem is that there are 400+ calls and moving mouse over all those 400+ hyperlinks and then copying it will be one hell of a task.

Saving this website using normal "Save as" does not save the required information.

Is there any other way I can save this website will all its details or somehow disabling this mouseover function so that call details are not hidden anymore.

Regards,


----------



## reventon (Oct 16, 2009)

Have a look at the page source code (*Ctrl + U* in Firefox), they are likely using in-line Javascript, in which case the details are there but hidden.


----------



## reventon (Oct 16, 2009)

Addition to the above post - if the information isn't immediately visible, can you post the relevant section that appears to create the table for us to look at?


----------



## aalishan (Mar 9, 2011)

Hello,

Unfortunately, I could not find anything.

I saved the webpage using "save as" and then saving the complete web page. In the source code it refers to subscriber usage details with a different reference (re) each time.

Following is the code for two different calls

<TR class=odd>
<TD>2011-02-22 20:43:20</TD>
<TD>Cdr</TD>
<TD>Outgoing Call </TD>
<TD>$ 0.00</TD>
<TD>$ 9.00</TD>
<TD>N/A</TD>
<TD><A class=details_btn title="View transaction details"
href="https://selfcare.chatrwireless.com/Chatr_SelfCare/view_subscriber_usage_history.do#details-0001"
rel=1106322805381|Cdr>Details</A> </TD></TR>
<TR class=even>
<TD>2011-02-21 21:46:20</TD>
<TD>Cdr</TD>
<TD>Incoming Call </TD>
<TD>$ 0.00</TD>
<TD>$ 9.00</TD>
<TD>N/A</TD>
<TD><A class=details_btn title="View transaction details"
href="https://selfcare.chatrwireless.com/Chatr_SelfCare/view_subscriber_usage_history.do#details-0001"
rel=1106319647246|Cdr>Details</A> </TD></TR>

Each time it refers to ~#details-001. 

I somehow need to fetch this information.

Regards,


----------



## aalishan (Mar 9, 2011)

Hello,

Following is the code of the table part:

TABLE id=account-history-table class="content history">
<THEAD>
<TR>
<TH class=sortable><A
href="https://selfcare.chatrwireless.com/Chatr_SelfCare/view_subscriber_usage_history.do?d-5827799-o=2&d-5827799-s=0">Time</A></TH>
<TH class=sortable><A
href="https://selfcare.chatrwireless.com/Chatr_SelfCare/view_subscriber_usage_history.do?d-5827799-o=2&d-5827799-s=1">Type</A></TH>
<TH class=sortable><A
href="https://selfcare.chatrwireless.com/Chatr_SelfCare/view_subscriber_usage_history.do?d-5827799-o=2&d-5827799-s=2">Sub
Type</A></TH>
<TH class=sortable><A
href="https://selfcare.chatrwireless.com/Chatr_SelfCare/view_subscriber_usage_history.do?d-5827799-o=2&d-5827799-s=3">Amount</A></TH>
<TH class=sortable><A
href="https://selfcare.chatrwireless.com/Chatr_SelfCare/view_subscriber_usage_history.do?d-5827799-o=2&d-5827799-s=4">AccountBalance</A></TH>
<TH class=sortable><A
href="https://selfcare.chatrwireless.com/Chatr_SelfCare/view_subscriber_usage_history.do?d-5827799-o=2&d-5827799-s=5">Account
Status</A></TH>
<TH></TH></TR></THEAD>
<TBODY>
<TR class=odd>
<TD>2011-02-22 20:43:20</TD>
<TD>Cdr</TD>
<TD>Outgoing Call </TD>
<TD>$ 0.00</TD>
<TD>$ 9.00</TD>
<TD>N/A</TD>
<TD><A class=details_btn title="View transaction details"
href="https://selfcare.chatrwireless.com/Chatr_SelfCare/view_subscriber_usage_history.do#details-0001"
rel=1106322805381|Cdr>Details</A> </TD></TR>
<TR class=even>
<TD>2011-02-21 21:46:20</TD>
<TD>Cdr</TD>
<TD>Incoming Call </TD>
<TD>$ 0.00</TD>
<TD>$ 9.00</TD>
<TD>N/A</TD>
<TD><A class=details_btn title="View transaction details"
href="https://selfcare.chatrwireless.com/Chatr_SelfCare/view_subscriber_usage_history.do#details-0001"
rel=1106319647246|Cdr>Details</A> </TD></TR>
<TR class=odd>
<TD>2011-02-21 14:17:13</TD>
<TD>Cdr</TD>
<TD>Incoming Call </TD>
<TD>$ 0.00</TD>
<TD>$ 9.00</TD>
<TD>N/A</TD>
<TD><A class=details_btn title="View transaction details"
href="https://selfcare.chatrwireless.com/Chatr_SelfCare/view_subscriber_usage_history.do#details-0001"
rel=1106318136894|Cdr>Details</A> </TD></TR>
<TR class=even>
<TD>2011-02-19 11:16:39</TD>
<TD>Cdr</TD>
<TD>Outgoing SMS </TD>
<TD>$ 0.15</TD>
<TD>$ 9.00</TD>
<TD>N/A</TD>
<TD><A class=details_btn title="View transaction details"
href="https://selfcare.chatrwireless.com/Chatr_SelfCare/view_subscriber_usage_history.do#details-0001"
rel=1106311348437|Cdr>Details</A> </TD></TR></TBODY></TABLE>

Regards,


----------



## aalishan (Mar 9, 2011)

In the beginning it is calling these java scripts:

<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js?ver=1.4.1'></script>

<script type='text/javascript' src='./js/tooltip-call-details.js'></script>

<script type='text/javascript' src='./js/scripts.js'></script>

<script type="text/javascript" src="./js/jquery-1.4.js" ></script>

The main culprit is tooltip-call-details.js

Here is the code for tooltip-call-details.js

/*
Based on: random.Next(): jQuery Ajax Tooltip
*/

$(function()
{
// hide transaction_details div and h3 tags if js is active
$("#transaction_details").hide();
$("#transaction_details h3").hide(); 

var hideDelay = 2000; // two seconds
var hideTimer = null;

// One instance that's reused to show info for the current transaction
var container = $('<div id="callDetailsPopupContainer">'
+ '<span id="tail"> </span>' 
+ '<table width="" border="0" cellspacing="0" cellpadding="0" align="center" class="callDetailsPopupPopup">'
+ '<tr>'
+ ' <td class="corner topLeft"></td>'
+ ' <td class="top"></td>'
+ ' <td class="corner topRight"></td>'
+ '</tr>'
+ '<tr>'
+ ' <td class="left"> </td>'
+ ' <td class="popupContentTD"><div id="callDetailsPopupContent"></div></td>'
+ ' <td class="right"> </td>'
+ '</tr>'
+ '<tr>'
+ ' <td class="corner bottomLeft"> </td>'
+ ' <td class="bottom"> </td>'
+ ' <td class="corner bottomRight"></td>'
+ '</tr>'
+ '</table>'
+ '</div>');

$('body').append(container);

$('.details_btn').live('mouseover', function()
{
//format of 'rel' tag; transactionId, transactionType
var rel = $(this).attr('rel');
if(rel == '') {
return;
}

var settings = $(this).attr('rel').split('|');
var transactionType = settings[1];

var item = $(this).attr('href');
var pos = $(this).offset();

var heightOfWindow = 600; 
var heightOfPopup = 170; // height (px) of popup - same as in css
var widthOfPopup = 271; // width (px) of popup - same as in css
var popupHeightOffset = 60; // offset for Height 
var popupWidthOffset = 55; // offset for Width

// if popup will be below window we need to move it up into viewable area
if (pos.top + heightOfPopup > heightOfWindow - 30) { 
// push it up 
var popupHeightOffset = -heightOfPopup; // offset for Height 
var tailClass = 'tail_down';
topPosition = pos.top + popupHeightOffset + 'px'; 
} else { 
// standard position 
var popupHeightOffset = -80; // offset for Height 
var tailClass = 'tail_up';
topPosition = pos.top + popupHeightOffset + 'px';
}

container.css({
left: (pos.left - widthOfPopup - popupWidthOffset) + 'px',
top: topPosition
});

// reset popup
$('#callDetailsPopupContent').html(' ');

$('#tail').removeClass('tail_up').removeClass('tail_down');

var text = null;
if(transactionType == 'Csr') {
$.get('usageHistoryDetails.do', {transactionIdAndType: rel}, function(data) {
text = $(data).find('.details_info').html();
var closeBtn = '<span class="close-popup"><a href="#">Close</a></span>';
$('#tail').addClass(tailClass);
$('#callDetailsPopupContent').html(text).prepend(closeBtn);
Hide Popup after clicking close 
$('#callDetailsPopupContent a').bind("click", function(){
$('#callDetailsPopupContainer').hide();
});

container.css('display', 'block');
});
} else {
$.get('histDetails.do', {transactionIdAndType: rel}, function(data) {
text = $(data).find('.details_info').html();
var closeBtn = '<span class="close-popup"><a href="#">Close</a></span>';
$('#tail').addClass(tailClass);
$('#callDetailsPopupContent').html(text).prepend(closeBtn);
Hide Popup after clicking close 
$('#callDetailsPopupContent a').bind("click", function(){
$('#callDetailsPopupContainer').hide();
});

container.css('display', 'block');
});
}
});

$('.details_btn').live('mouseout', function()
{
if (hideTimer)
clearTimeout(hideTimer);
hideTimer = setTimeout(function()
{
container.css('display', 'none');
}, hideDelay);
});

// Allow mouse over of details without hiding details
$('#callDetailsPopupContainer').mouseover(function()
{
if (hideTimer)
clearTimeout(hideTimer);
});

// Hide after mouseout
$('#callDetailsPopupContainer').mouseout(function()
{
if (hideTimer)
clearTimeout(hideTimer);
hideTimer = setTimeout(function()
{
container.css('display', 'none');
}, hideDelay);
}); 
});


I tried commenting it out from the main page but it does not help


----------



## Ninjaboi (Dec 27, 2010)

```
// Hide after mouseout
$('#callDetailsPopupContainer').mouseout(function()
{
if (hideTimer)
clearTimeout(hideTimer);
hideTimer = setTimeout(function()
{
container.css('display', 'none');
}, hideDelay);
}); 
});
```
Try removing or commenting this part out if you can. This would (should) allow you to mouse-over each one and after the mouse-out event, it will still be displayed (I think).

It's worth a try :grin:.


----------



## aalishan (Mar 9, 2011)

Already did that .. Doesnt help


----------



## Ninjaboi (Dec 27, 2010)

```
container.css('display', 'block');
            });
        } else {
            $.get('histDetails.do', {transactionIdAndType: rel}, function(data) {
                text = $(data).find('.details_info').html();
                var closeBtn = '<span  class="close-popup"><a href="#">Close</a></span>';
                $('#tail').addClass(tailClass);
                $('#callDetailsPopupContent').html(text).prepend(closeBtn);
                 Hide Popup after clicking close 
                $('#callDetailsPopupContent a').bind("click", function(){
                    $('#callDetailsPopupContainer').hide();
                });
```
Maybe try changing/commenting/removing out:


```
Hide Popup after clicking close 
                 $('#callDetailsPopupContent a').bind("click", function(){
                     $('#callDetailsPopupContainer').hide();
```


----------



## aalishan (Mar 9, 2011)

Also did that  .. I thought that I will comment out this portion and this function/class will not be called. 

But the question is whether the hidden information is collected from the server when the mouse is moved to that portion or is it already somewhere in the code and displayed by moving the mouse.

I think it is received from the server but then how can it receive it when I am not connected to the internet..... i dont know .. im confused and confusing others lolsss....

It must be stored somewhere in my computer, cookies or something and that is why I posted it in the firefox section 

BR,
Aalishan


----------



## Ninjaboi (Dec 27, 2010)

Sorry for not being much help lol. See if they can help you over there, if so great. If not, you can either start another thread here or just reply to this again ( seeing is how it's not solved ). I'm not great with HTML, I use it though. So it's not like a professional is taking a look at it.


----------



## aalishan (Mar 9, 2011)

I know ninjaboi... its not basically the html that is causing the problem ,, its something in this java script thing .. too bad for me that I did not choose any java course in my undergrad ))) .. I guess, I will post it in some java thread... If I find any answer.. ill post it here..

Thanks for your help


----------



## Ninjaboi (Dec 27, 2010)

No problem. This very well could be Javascript, which is a different breed on it's own from Java. They share similar syntax, but as far as I know they're not much alike at all. Javascript is, as it's name gives off, a scripting language. Java is a programming language. I'd assume it to be Javascript rather than Java, as that's what the majority of people use for embedded HTML pages. I have almost no knowledge at all of Javascript, but I'm decent with Java. If this is Java, and you manage to get the code ( doubt it though lol ) then you can post it here for analysis.

Good luck!


----------



## sabata (Mar 17, 2011)

Hi Ninjaboi,

I really need your help,i am working on a site using Javascript( javascript: document.body.contentEditable = 'true' ; document.designmode = 'on' ; void0) but don´t know how to save the site after finish working on it.Could you please fetch me any information that could help me on that.Thanks in advance.

Sabata.


----------



## Ninjaboi (Dec 27, 2010)

Hello sabata, welcome to TSF!

It's preferred that you start your own thread for assistance unless it contributes to the original poster's question.

When your working with HTML, you usually just pull up Notepad (or any text editor), write the code, and save the file as either a .htm or .html file type. Once you do that, your able to open the file using your browser to view what you've made. Working with Javascript just means that you'll have the script inside the HTML document when you save. If your working with Notepad as your text editor, you can do this to save your document:

1. File >> Save as... >> File name: "file_name.htm" or "file_name.html".
2. CTRL+S >> File name: "file_name.htm" or "file_name.html".

Note that the second option of saving works both for creating the document and updating changes. However, when the document is already saved before and you do CTRL+S, it will simply save the changes over the previous save.

I hope I hit where you were wanting me to. If not, please start a new thread with more information regarding what you need to do and what you are using to create your site.


----------

