ZennoLab Assemblies Documentation
Reload Method (HtmlElement)
Example 
Reloads the html element.
Syntax
public void Reload()
Remarks
This method performs the reload the html element.
Example
The following code example demonstrates uses of the Reload method
// find flash objects
var flashObjects = instance.ActiveTab.FindElementsByTags("embed;object");
if (flashObjects == null) return -1;
         
// set wmode = opaque every element which has incorrect value of property "wmode"
for (int i = 0; i < flashObjects.Count; i++)
{
    var flashObjectsNew = instance.ActiveTab.FindElementsByTags("embed;object");
    var element         = flashObjectsNew.GetByNumber(i);
    
    var children = element.FindChildrenByName("wmode");
    if (children != null && children.Count != 0) {
        for (int j = 0; j < children.Count; j++)
        {
            var child = children.GetByNumber(j);
            if (child.ParentElement.ZP_ID != element.ZP_ID)
                continue;
                
            if (child.TagName.ToLower().Equals("param"))
            {
                var wmode = child.GetAttribute("value");
                if (wmode != null && (!wmode.ToLower().Equals("opaque") && !wmode.ToLower().Equals("transparent")))
                {
                    child.SetAttribute("value", "opaque");
                    element.Reload();
                }
            }
        }
    }
    else
    {
        var wmode = element.GetAttribute("wmode");
        if (!(wmode != null && (wmode.ToLower().Equals("opaque") || wmode.ToLower().Equals("transparent"))))
        {
            element.SetAttribute("wmode", "opaque");
            element.Reload();
        }
    }
}
// find flash objects
$flashObjects = $instance->ActiveTab->FindElementsByTags("embed;object");
if ($flashObjects == null) return -1;
         
// set wmode = opaque every element which has incorrect value of property "wmode"
for ($i = 0; $i < $flashObjects->Count; i++)
{
    $flashObjectsNew = $instance->ActiveTab->FindElementsByTags("embed;object");
    $element         = $flashObjectsNew->GetByNumber($i);
    
    $children = $element->FindChildrenByName("wmode");
    if ($children != null && $children->Count != 0) {
        for ($j = 0; $j < $children->Count; j++)
        {
            $child = $children->GetByNumber($j);
            if ($child->ParentElement->ZP_ID != $element->ZP_ID)
                continue;
                
            if ($child->TagName->ToLower()->Equals("param"))
            {
                $wmode = $child->GetAttribute("value");
                if ($wmode != null && (!$wmode->ToLower()->Equals("opaque") && !$wmode->ToLower()->Equals("transparent")))
                {
                    $child->SetAttribute("value", "opaque");
                    $element->Reload();
                }
            }
        }
    }
    else
    {
        $wmode = $element->GetAttribute("wmode");
        if (!($wmode != null && ($wmode->ToLower()->Equals("opaque") || $wmode->ToLower()->Equals("transparent"))))
        {
            $element->SetAttribute("wmode", "opaque");
            $element->Reload();
        }
    }
}
Requirements

Target Platforms: Desktop: Windows XP SP3 and older. Server: Windows Server 2003 and older.

See Also

Reference

HtmlElement Class
HtmlElement Members

Send Feedback